Bug #4583
closed
Failed to compile "('0', 0)[1] ! xs:integer(.)"
Fix Committed on JS Branch:
2
Description
Reported on saxon-help mailing list:
Saxon-JS 2.0.2 fails to compile this simple stylesheet which 10.1J can compile and execute.
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet exclude-result-prefixes="#all" version="3.0"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template name="xsl:initial-template">
<i>
<xsl:value-of select="('0', 0)[1] ! xs:integer(.)" />
</i>
</xsl:template>
</xsl:stylesheet>
produces:
Compiling stylesheet /tmp/test.xsl
Failed to compile stylesheet: Cannot read property 'name' of undefined
(long backtrace snipped)
- Applies to JS Branch 2.0 added
Added test case to XSLT3 suite as predicate-057
Problem reproduced; the failure appears to be with the expression st.itemType.underlyingType.name
at line 31 of Function.js;
st.itemType
is AnyItemType
, so underlyingType
is undefined.
This path is only looking for an optimisation opportunity, so I think it can be fixed by treating local === st.itemType.underlyingType.name
as false in this case.
- Subject changed from Failed to compile "('0', 0)[1] ! xs:integer(.)" to Documentation - superscript not rendered
- Subject changed from Documentation - superscript not rendered to Failed to compile "('0', 0)[1] ! xs:integer(.)"
- Assignee changed from Michael Kay to John Lumley
- Status changed from New to Resolved
- Applies to JS Branch Trunk added
adding && st.itemType.underlyingType
to Function.js#31
fixes the problem. Awaiting archive before committing
- Fix Committed on JS Branch Trunk added
- Status changed from Resolved to In Progress
Reopening as xs:NOTATION()
is now giving a wrong error (XPST0080
rather than XPST0017
)
- Status changed from In Progress to Resolved
Remarking as resolved - wrong error codes are not critical.
- Applies to JS Branch 2 added
- Applies to JS Branch deleted (
2.0, Trunk)
- Fix Committed on JS Branch 2 added
- Fix Committed on JS Branch deleted (
Trunk)
- Status changed from Resolved to Closed
- % Done changed from 0 to 100
- Fixed in JS Release set to Saxon-JS 2.1
Bug fix applied in the Saxon-JS 2.1 maintenance release.
Please register to edit this issue
Also available in: Atom
PDF
Tracking page