Project

Profile

Help

Bug #6393

closed

XSLT 1.0: Comparison of string-valued nodeset and number fails

Added by Heiko Theißen 6 months ago. Updated about 19 hours ago.

Status:
Closed
Priority:
Normal
Category:
XPath Conformance
Sprint/Milestone:
-
Start date:
2024-04-15
Due date:
% Done:

100%

Estimated time:
Applies to JS Branch:
2, Trunk
Fix Committed on JS Branch:
2, Trunk
Fixed in JS Release:
SEF Generated with:
Platforms:
Company:
-
Contact person:
-
Additional contact persons:
-

Description

Consider the following source file and stylesheet:

test.xml

<?xml-stylesheet type="text/xsl" href="test.xsl"?>
<a>A</a>

test.xsl

<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  <xsl:template match="/">
    <span>
      <xsl:value-of select="a=1"/>
    </span>
  </xsl:template>
</xsl:stylesheet>

When I try to transform this using SaxonJS (2.6.0), I get an error:

>xslt3 -xsl:test.xsl -s:test.xml
Transformation failure: Error FORG0001 at test.xsl#4
  Supplied value "A" is not a valid xs:double
Error FORG0001 at test.xsl#4
  Supplied value "A" is not a valid xs:double

When I open the XML file in my Chrome browser and have it transformed by the browser, it works:

<span>false</span>

Please register to edit this issue

Also available in: Atom PDF Tracking page