XSLTProcessor
An XSLTProcessor applies an XSLT stylesheet transformation to an XML document to
produce a new XML document as output. It has methods to load the XSLT stylesheet, to
manipulate <xsl:param> parameter values, and to apply the
transformation to documents.
Constructor
XSLTProcessor()-
Create a new
XSLTProcessor.
Instance methods
XSLTProcessor.importStylesheet()-
Imports the XSLT stylesheet. If the given node is a document node, you can pass in a full XSL Transform or a literal result element transform; otherwise, it must be an
<xsl:stylesheet>or<xsl:transform>element. XSLTProcessor.transformToFragment()-
Transforms the node source by applying the XSLT stylesheet imported using the
XSLTProcessor.importStylesheet()function. The owner document of the resulting document fragment is the owner node. XSLTProcessor.transformToDocument()-
Transforms the node source applying the XSLT stylesheet given importing using the
XSLTProcessor.importStylesheet()function. XSLTProcessor.setParameter()-
Sets a parameter (
<xsl:param>) value in the XSLT stylesheet that was imported. XSLTProcessor.getParameter()-
Gets the value of a parameter from the XSLT stylesheet.
XSLTProcessor.removeParameter()-
Removes the parameter if it was previously set. This will make the
XSLTProcessoruse the default value for the parameter as specified in the XSLT stylesheet. XSLTProcessor.clearParameters()-
Removes all set parameters from the
XSLTProcessor. TheXSLTProcessorwill then use the default values specified in the XSLT stylesheet. XSLTProcessor.reset()-
Removes all parameters and stylesheets from the
XSLTProcessor.
Instance properties
This are no properties for this interface.
Examples
Specifications
| Specification |
|---|
| DOM Standard # interface-xsltprocessor |
Browser compatibility
BCD tables only load in the browser