blob: 924a7e6b42aa4abff3c71a570fbe1b531f0135b4 [file] [log] [blame]
<body>
<p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=19215">bug 19215</a>:
XSLT transformToDocument fails when stylesheet contains &amp;#160;</p>
<script>
if (window.testRunner)
testRunner.dumpAsText();
try {
var XML = '<?xml version="1.0" encoding="utf-8" ?>'+
'<libraries xmlns:xhtml="http://www.w3.org/1999/xhtml">'+
'</libraries>';
var XSL = '<?xml version="1.0" encoding="UTF-8" ?>'+
'<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"'+
' xmlns="http://www.w3.org/1999/xhtml"'+
' version="1.0">'+
' <xsl:template match="/">'+
' <html xmlns="http://www.w3.org/1999/xhtml" lang="en"'+
' xml:lang="en">'+
' <head>'+
' <title>'+
' </title>'+
' </head>'+
' <body foo="&#160;">'+
'&#160;'+
' </body>'+
' </html>'+
' </xsl:template>'+
'</xsl:stylesheet>';
var parser = new DOMParser();
var d = parser.parseFromString(XML, "text/xml");
var parser = new DOMParser();
var xsl = parser.parseFromString(XSL, "text/xml");
var xsltproc = new XSLTProcessor();
xsltproc.importStylesheet(xsl);
var result = xsltproc.transformToDocument(d);
document.write(result ? "SUCCESS" : "FAILURE");
} catch (ex) {
document.write("Exception: " + ex);
}
</script>
</body>