| [ Web Proxy ] |
| Viewing: https://developer.mozilla.org/ko/docs/Web/API/XSLTProcessor | [Back] [Original] |
Get to know MDN better
This page was translated from English by the community. Learn more and join the MDN Web Docs community.
Avoid using this feature in new projects. XSLT is a candidate for removal from browsers because browser implementations are highly susceptible to memory safety vulnerabilities. This feature may be a candidate for removal from web standards or browsers.
Mozilla 1.2 JavaScript XSLT (TransforMiiX) .
, XSLTProcessor .
var processor = new XSLTProcessor();
importStylesheet() (import) . XSLT DOM . ( DOM , ) . DOM . .
var testTransform = document.implementation.createDocument("", "test", null);
// just an example to get a transform into a script as a DOM
// XMLDocument.load is asynchronous, so all processing happens in the
// onload handler
testTransform.addEventListener("load", onload, false);
testTransform.load("test-transform.xml");
function onload() {
processor.importStylesheet(testTransform);
}
importStylesheet DOM . XSL Transform literal result element transform , xsl:stylesheet xsl:transform .
XSLT transformToDocument() transformToFragment() .
transformToDocument() DOM Document .
var newDocument = processor.transformToDocument(domToBeTransformed);
output html HTMLDocument, xml XMLDocument, text text <transformiix:result> XMLDocument.
DOM DocumentFragment transformToFragment() . (fragment) (merge) . overhead .
transformToFragment . ( ) ( ) Document .
var ownerDocument = document.implementation.createDocument("", "test", null);
var newFragment = processor.transformToFragment(domToBeTransformed, ownerDocument);
transformToFragment HTMLDocument output HTML HTML DOM . transformToFragment <html> HTML DOM . (override) , output .
setParameter, getParameter, removeParameter parameters for the stylesheet . setParameter URI .
XSLTProcessor (processor) reset() . Mozilla 1.3 .
| Specification |
|---|
| DOM # interface-xsltprocessor |
This page was last modified on 2025 6 27 by MDN contributors.
Your blueprint for a better internet.
Portions of this content are 19982026 by individual mozilla.org contributors. Content available under a Creative Commons license.
| Web Proxy Viewer | New URL | Original Page |