Name

XSLTProcessor.transformToDocument( ): transform a node or document to a new document

Synopsis

Document transformToDocument(NodesourceNode)

Arguments

source

The document or node that is to be transformed.

Returns

A Document object that holds the result of the transformation.

Description

This method performs an XSLT transformation on the specified node, returning the result as a Document object. The transformation uses the XSLT stylesheet specified by importStylesheet( ) and the parameter values specified with setParameter( ).

Get JavaScript: The Definitive Guide, 5th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.