WARNING: Most of this content (with the exception of the Mozilla 1.9 XPCOM reference) is very old, and can be expected to be out of date and possibly obsolete. For better XUL documentation, please visit the XUL hub at the Mozilla Developer Center.

nsIXSLTProcessor

IID:4a91aeb3-4100-43ee-a21e-9866268757c5
Inherits From:nsISupports

Methods

void clearParameters ( ) nsIVariant getParameter ( DOMString namespaceURI , DOMString localName ) void importStylesheet ( nsIDOMNode style ) void removeParameter ( DOMString namespaceURI , DOMString localName ) void reset ( ) void setParameter ( DOMString namespaceURI , DOMString localName , nsIVariant value ) nsIDOMDocument transformToDocument ( nsIDOMNode source ) nsIDOMDocumentFragment transformToFragment ( nsIDOMNode source , nsIDOMDocument output )

void clearParameters ( )

Removes all set parameters from this nsIXSLTProcessor. This will make the processor use the default-value for all parameters as specified in the stylesheet.


nsIVariant getParameter ( DOMString namespaceURI , DOMString localName )

Gets a parameter if previously set by setParameter. Returns null otherwise.

Arguments:
namespaceURI: The namespaceURI of the XSLT parameter
localName: The local name of the XSLT parameter
Returns:
nsIVariant The value of the XSLT parameter

void importStylesheet ( nsIDOMNode style )

Import the stylesheet into this XSLTProcessor for transformations.

Arguments:
style: The root-node of a XSLT stylesheet. This can be either a document node or an element node. If a document node then the document can contain either a XSLT stylesheet or a LRE stylesheet. If the argument is an element node it must be the xsl:stylesheet (or xsl:transform) element of an XSLT stylesheet.

void removeParameter ( DOMString namespaceURI , DOMString localName )

Removes a parameter, if set. This will make the processor use the default-value for the parameter as specified in the stylesheet.

Arguments:
namespaceURI: The namespaceURI of the XSLT parameter
localName: The local name of the XSLT parameter

void reset ( )

Remove all parameters and stylesheets from this nsIXSLTProcessor.


void setParameter ( DOMString namespaceURI , DOMString localName , nsIVariant value )

Sets a parameter to be used in subsequent transformations with this nsIXSLTProcessor. If the parameter doesn't exist in the stylesheet the parameter will be ignored.

Arguments:
namespaceURI: The namespaceURI of the XSLT parameter
localName: The local name of the XSLT parameter
value: The new value of the XSLT parameter

nsIDOMDocument transformToDocument ( nsIDOMNode source )

Transforms the node source applying the stylesheet given by the importStylesheet() function.

Arguments:
source: The node to be transformed
Returns:
Document The result of the transformation

nsIDOMDocumentFragment transformToFragment ( nsIDOMNode source , nsIDOMDocument output )

Transforms the node source applying the stylesheet given by the importStylesheet() function. The owner document of the output node owns the returned document fragment.

Arguments:
source: The node to be transformed
output: This document is used to generate the output
Returns:
DocumentFragment The result of the transformation

Reference documentation is generated from Mozilla's source.