XSLTProcessor: transformToFragment() method

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

Syntax

js
transformToFragment(source, document)

Parameters

source

The Node source to apply the XSLT stylesheet to.

document

The Document the document fragment will be associated with. (Any document fragment is associated with a document it can be added to).

Return value

Examples

Specifications

Specification
DOM Standard
# dom-xsltprocessor-transformtofragment

Browser compatibility

desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
transformToFragment

See also