Friday, February 23rd, 2007
Ruben Daniels was on a mission to create XPath and XSLT support that works on Safari.
This isn’t the first effort:
After searching the web I found several XPath/XSLT implementations:
- google AJAXSLT (168 KB)
- Cameron McCormackâ€™s Xpath implementation (119 KB)
- JS-XPath IE-only (16 KB)
He ended up with some small libraries, and he discusses how he got there in his entry.
How to use it
- // xpath
- var nodeset = XPath.selectNodes("//j:teleport/node()|text()", xmlContextNode);
- // xslt
- var xsltProcessor = new XSLTProcessor();
- d = document.implementation.createDocument("", "", null);
- f = xsltProcessor.transformToFragment(this, d);
Posted by Dion Almaer at 6:49 pm