Table of Contents

Class XSLTProcessor

Namespace
CSharpToJavaScript.APIs.JS
Assembly
CSharpToJavaScript.dll

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.

[Value("XSLTProcessor")]
public class XSLTProcessor
Inheritance
XSLTProcessor
Inherited Members

Remarks

Constructors

XSLTProcessor()

The XSLTProcessor() constructor creates a new XSLTProcessor object instance.

public XSLTProcessor()

Remarks

Methods

ClearParameters()

The clearParameters() method of the XSLTProcessor interface removes all parameters (<xsl:param>) and their values from the stylesheet imported in the processor. The XSLTProcessor will then use the default values specified in the XSLT stylesheet.

[Value("clearParameters")]
public GlobalObject.Undefined ClearParameters()

Returns

GlobalObject.Undefined

None (GlobalObject.Undefined).

Remarks

GetParameter(string, string)

The getParameter() method of the XSLTProcessor interface returns the value of a parameter (<xsl:param>) from the stylesheet imported in the processor.

[Value("getParameter")]
public dynamic GetParameter(string namespaceURI, string localName)

Parameters

namespaceURI string
localName string

Returns

dynamic

An object that is the value associated with the parameter. It can be of any type.

NOTE
Firefox supports any kind of parameter. Chrome, Edge and Safari only support string parameters.

Remarks

ImportStylesheet(Node)

The importStylesheet() method of the XSLTProcessor interface imports an XSLT stylesheet for the processor.

[Value("importStylesheet")]
public GlobalObject.Undefined ImportStylesheet(Node style)

Parameters

style Node

Returns

GlobalObject.Undefined

None (GlobalObject.Undefined).

Remarks

RemoveParameter(string, string)

The removeParameter() method of the XSLTProcessor interface removes the parameter (<xsl:param>) and its value from the stylesheet imported in the processor.

[Value("removeParameter")]
public GlobalObject.Undefined RemoveParameter(string namespaceURI, string localName)

Parameters

namespaceURI string
localName string

Returns

GlobalObject.Undefined

None (GlobalObject.Undefined).

Remarks

Reset()

The reset() method of the XSLTProcessor interface removes all parameters (<xsl:param>) and the XSLT stylesheet from the processor. The XSLTProcessor will then be in its original state when it was created.

[Value("reset")]
public GlobalObject.Undefined Reset()

Returns

GlobalObject.Undefined

None (GlobalObject.Undefined).

Remarks

SetParameter(string, string, dynamic)

The setParameter() method of the XSLTProcessor interface sets the value of a parameter (<xsl:param>) in the stylesheet imported in the processor.

[Value("setParameter")]
public GlobalObject.Undefined SetParameter(string namespaceURI, string localName, dynamic value)

Parameters

namespaceURI string
localName string
value dynamic

Returns

GlobalObject.Undefined

None (GlobalObject.Undefined).

Remarks

TransformToDocument(Node)

The transformToDocument() method of the XSLTProcessor interface transforms the provided Node source to a Document using the XSLT stylesheet associated with XSLTProcessor.

[Value("transformToDocument")]
public Document TransformToDocument(Node source)

Parameters

source Node

Returns

Document

A Document. The actual interface depends on the output method of the stylesheet, as specified by <xsl:output> element's method.

Output methodResult interface
htmlHTMLDocument
xmlXMLDocument
textXMLDocument with a single root element <transformiix:result> with the text as a child

Remarks

TransformToFragment(Node, Document)

The transformToFragment() method of the XSLTProcessor interface transforms a provided Node source to a DocumentFragment using the XSLT stylesheet associated with the XSLTProcessor.

[Value("transformToFragment")]
public DocumentFragment TransformToFragment(Node source, Document output)

Parameters

source Node
output Document

Returns

DocumentFragment

A DocumentFragment.

Remarks