JavaScript: The Definitive Guide

25.343. XSLTProcessor.transformToFragment( ): transform a node or document to a DocumentFragment

25.343.1. Synopsis

DocumentFragment transformToFragment(Node sourceNode, Document ownerDocument)

25.343.1.1. Arguments

source

The document or node that is to be transformed.

owner

The document through which the returned DocumentFragment is created. The ownerDocument property of the returned DocumentFragment refers to this document.

25.343.1.2. Returns

A DocumentFragment object that holds the result of the transformation.

25.343.2. Description

This method performs an XSLT transformation on the specified node, returning the result as a DocumentFragment object. The transformation uses the XSLT stylesheet specified by importStylesheet( ) and the parameter values specified with setParameter. The returned fragment can be inserted into the specified owner document.

Категории