4 https://bugzilla.mozilla.org/show_bug.cgi?id=511487
7 <title>Test for Bug
511487</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=511487">Mozilla Bug
511487</a>
14 <div id=
"content" style=
"display: none">
18 <script type=
"application/javascript">
20 /** Test for Bug
511487 **/
22 var didTransform = false;
23 var processor = new XSLTProcessor();
25 '
<xsl:stylesheet xmlns:
xsl=
"http://www.w3.org/1999/XSL/Transform" version=
"1.0" xmlns=
"http://www.w3.org/1999/xhtml">' +
26 '
<xsl:output method=
"xml" version=
"1.0" encoding=
"UTF-8" doctype-system=
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" doctype-public=
"-//W3C//DTD XHTML 1.0 Transitional//EN" />' +
27 '
<xsl:template match=
"wml">' +
28 '
<html xmlns=
"http://www.w3.org/1999/xhtml">' +
30 '
<title>XSLT test
</title>' +
32 '
<body onload=
"window.alert(this)">' +
37 var styleDoc = new DOMParser().parseFromString (style,
"text/xml");
40 '
<?xml version=
"1.0"?>' +
41 '
<!DOCTYPE wml PUBLIC
"-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">' +
42 '
<wml><card><p>paragraph
</p></card></wml>';
43 var originalDoc = new DOMParser().parseFromString(data,
"text/xml");
45 processor.importStylesheet(styleDoc);
47 var transformedDocument = processor.transformToDocument(originalDoc);
53 ok(didTransform,
"transformToDocument didn't succeed!");