Name
XSLTProcessor: transform XML with XSLT stylesheets — Firefox 1.0, Safari 2.01, Opera 9: Object → XSLTProcessor
Constructor
new XSLTProcessor( )
Methods
-
clearParameters( ) Deletes any previously set parameters.
-
getParameter( ) Returns the value of a named parameter.
-
importStyleSheet( ) Specifies the XSLT stylesheet to be used.
-
removeParameter( ) Deletes a named parameter.
-
reset( ) Resets the XSLTProcessor to its initial state, clearing all parameters and stylesheets.
-
setParameter( ) Sets a named parameter to a specified value.
-
transformToDocument( ) Transforms the specified document or node using the stylesheet passed to
importStylesheet( )and parameters passed tosetParameter( ). Returns the result as a new Document object.-
transformToFragment( ) Transforms the specified document or node, returning the result as a DocumentFragment.
Description
The XSLTProcessor transforms XML document nodes using XSLT
stylesheets. Create an XSLTProcessor object with the no-argument
constructor, and initialize it with an XSLT stylesheet with the
importStylesheet( ) method. If
your stylesheet uses parameters, you can set those with
setParameter( ). Finally, perform an actual XSL transformation with
tranformToDocument( ) or transformToFragment( ).
Internet Explorer supports XSLT but does not implement the
XSLTProcessor object. See the IE-specific transformNode( ) and transformNodeToObject( ) methods of Node,
and see Chapter 21 for XSLT examples and
cross-platform utility functions.
See Also
Node.transformNode( ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access