1 <?xml version=
"1.0" encoding=
"utf-8"?>
2 <!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3 <html xmlns=
"http://www.w3.org/1999/xhtml" xml:
lang=
"en">
5 <title>xsl import test
</title>
6 <script type=
"text/javascript">
9 testRunner.dumpAsText();
11 var req = new XMLHttpRequest();
12 var xslt = new XSLTProcessor();
13 req.open('GET', 'resources/xhr-doc.xsl', false);
15 xslt.importStylesheet(req.responseXML);
17 req.open('GET', 'resources/xhr-doc.xml', false);
19 var doc = xslt.transformToDocument(req.responseXML);
20 var fragment = document.importNode(doc.documentElement, true);
22 var div = document.getElementById('div');
23 div.parentNode.replaceChild(fragment, div);
27 <body onload=
"load()">
28 <p>Test for
<a href=
"http://bugs.webkit.org/show_bug.cgi?id=10313">bug
10313</a>:
29 xsl:import doesn't work in stylesheets loaded via XMLHttpRequest.
</p>
31 <div id=
"div">It's nice that this hasn't crashed, but the XSL transformation has failed.
</div>