dom/xslt/crashtests/545927.html

Fri, 16 Jan 2015 18:13:44 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Fri, 16 Jan 2015 18:13:44 +0100
branch
TOR_BUG_9701
changeset 14
925c144e1f1f
permissions
-rw-r--r--

Integrate suggestion from review to improve consistency with existing code.

michael@0 1 <html>
michael@0 2 <head>
michael@0 3 <script>
michael@0 4 function main()
michael@0 5 {
michael@0 6 xml=document.implementation.createDocument('', '', null);
michael@0 7 xml.appendChild(doc=xml.createElement('root'));
michael@0 8
michael@0 9 var p = new DOMParser();
michael@0 10 text = '<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">';
michael@0 11 text += '<xsl:template match="/">';
michael@0 12 text += '<body>';
michael@0 13 text += '<xsl:number value="2147483648" format="i"/>';
michael@0 14 text += '</body>';
michael@0 15 text += '</xsl:template>';
michael@0 16 text += '</xsl:stylesheet>';
michael@0 17 xsl=p.parseFromString(text, 'text/xml');
michael@0 18
michael@0 19 xsltProcessor=new XSLTProcessor();
michael@0 20 xsltProcessor.importStylesheet(xsl);
michael@0 21 d = xsltProcessor.transformToFragment(xml, document);
michael@0 22 }
michael@0 23 </script>
michael@0 24 </head>
michael@0 25 <body onload="main()">
michael@0 26 </body>
michael@0 27 </html>
michael@0 28

mercurial