| <?xml version="1.0" encoding="utf-8"?> |
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
| <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> |
| <head> |
| <title>xsl import test</title> |
| <script type="text/javascript"> |
| function load() { |
| if (window.testRunner) |
| testRunner.dumpAsText(); |
| |
| var req = new XMLHttpRequest(); |
| var xslt = new XSLTProcessor(); |
| req.open('GET', 'resources/xhr-doc.xsl', false); |
| req.send(null); |
| xslt.importStylesheet(req.responseXML); |
| |
| req.open('GET', 'resources/xhr-doc.xml', false); |
| req.send(null); |
| var doc = xslt.transformToDocument(req.responseXML); |
| var fragment = document.importNode(doc.documentElement, true); |
| |
| var div = document.getElementById('div'); |
| div.parentNode.replaceChild(fragment, div); |
| } |
| </script> |
| </head> |
| <body onload="load()"> |
| <p>Test for <a href="http://bugs.webkit.org/show_bug.cgi?id=10313">bug 10313</a>: |
| xsl:import doesn't work in stylesheets loaded via XMLHttpRequest.</p> |
| |
| <div id="div">It's nice that this hasn't crashed, but the XSL transformation has failed.</div> |
| </body> |
| </html> |