XSLT SUPPORT IN BROWSERS
XSLT is a companion technology to XML that makes use of XPath to transform one document representation into another. Unlike XML and XPath, XSLT has no formal API associated with it and is not represented in the formal DOM at all. This left browser vendors to implement support in their own way. The first browser to add XSLT processing in JavaScript was Internet Explorer.
The XSLTProcessor Type
Mozilla implemented JavaScript support for XSLT in Firefox by creating a new type. The XSLTProcessor
type allows developers to transform XML documents by using XSLT in a manner similar to the XSL processor in Internet Explorer. Since it was first implemented, all major browsers have copied the implementation, making XSLTProcessor
into a de facto standard for JavaScript-enabled XSLT transformations.
As with the Internet Explorer implementation, the first step is to load two DOM documents, one with the XML and the other with the XSLT. After that, create a new XSLTProcessor...