4 https://bugzilla.mozilla.org/show_bug.cgi?id=551654
7 <title>Test for Bug
551654</title>
8 <script src=
"/tests/SimpleTest/SimpleTest.js"></script>
9 <link rel=
"stylesheet" type=
"text/css" href=
"/tests/SimpleTest/test.css"/>
12 <a target=
"_blank" href=
"https://bugzilla.mozilla.org/show_bug.cgi?id=551654">Mozilla Bug
551654</a>
14 <div id=
"content" style=
"display: none">
18 <script type=
"application/javascript">
20 /** Test for Bug
551654 **/
22 var didTransform = false;
23 var processor = new XSLTProcessor();
25 '
<xsl:stylesheet xmlns:
xsl=
"http://www.w3.org/1999/XSL/Transform" ' +
26 'xmlns:
exsl=
"http://exslt.org/common" ' +
28 '
<xsl:output method=
"html"/>' +
29 '
<xsl:template match=
"/">' +
30 '
<xsl:copy-of select=
"exsl:node-set(42)"/>' +
33 var styleDoc = new DOMParser().parseFromString (style,
"text/xml");
37 var originalDoc = new DOMParser().parseFromString(data,
"text/xml");
39 processor.importStylesheet(styleDoc);
40 var fragment = processor.transformToFragment(originalDoc, document);
41 is(fragment.firstChild.nodeType, Node.TEXT_NODE,
42 "Result of transform should be a textnode");
43 is(fragment.firstChild.nodeValue,
"42",
44 "Result of transform should be a textnode with value '42'");