| OLD | NEW |
| (Empty) | |
| 1 <!DOCTYPE html> |
| 2 <script src="../../resources/testharness.js"></script> |
| 3 <script src="../../resources/testharnessreport.js"></script> |
| 4 <script> |
| 5 test(() => { |
| 6 const xmlSource = '<poke/>'; |
| 7 const xslSource = `<xsl:stylesheet version="1.0" |
| 8 xmlns:xsl="http://www.w3.org/1999/XSL/Transform" |
| 9 xmlns:exsl="http://exslt.org/common"> |
| 10 |
| 11 <xsl:variable name="peek" select="exsl:node-set('')"/> |
| 12 |
| 13 <xsl:template match="poke"> |
| 14 <xsl:text>PASS</xsl:text> |
| 15 </xsl:template> |
| 16 </xsl:stylesheet>`; |
| 17 |
| 18 const parser = new DOMParser(); |
| 19 const xsl = parser.parseFromString(xslSource, 'text/xml'); |
| 20 const xml = parser.parseFromString(xmlSource, 'text/xml'); |
| 21 |
| 22 const xslproc = new XSLTProcessor(); |
| 23 xslproc.importStylesheet(xsl); |
| 24 const result = xslproc.transformToFragment(xml, document); |
| 25 assert_equals(result.firstChild.textContent, 'PASS'); |
| 26 }, 'a variable set to node-set of a string should not halt processing'); |
| 27 </script> |
| OLD | NEW |