blob: 26ace540634c1ab7a52bc94684e49057ba02a5e0 [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.layoutTestController)
layoutTestController.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>