Bug #4583
closedFailed to compile "('0', 0)[1] ! xs:integer(.)"
100%
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)
Updated by Michael Kay over 4 years ago
Added test case to XSLT3 suite as predicate-057
Updated by Michael Kay over 4 years ago
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.
Updated by Michael Kay over 4 years ago
- Subject changed from Failed to compile "('0', 0)[1] ! xs:integer(.)" to Documentation - superscript not rendered
Updated by Michael Kay over 4 years ago
- Subject changed from Documentation - superscript not rendered to Failed to compile "('0', 0)[1] ! xs:integer(.)"
Updated by Michael Kay over 4 years ago
- Assignee changed from Michael Kay to John Lumley
Updated by John Lumley over 4 years ago
- 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
Updated by John Lumley over 4 years ago
- Status changed from Resolved to In Progress
Reopening as xs:NOTATION()
is now giving a wrong error (XPST0080
rather than XPST0017
)
Updated by Debbie Lockett over 4 years ago
- Status changed from In Progress to Resolved
Remarking as resolved - wrong error codes are not critical.
Updated by Community Admin almost 4 years ago
- Applies to JS Branch 2 added
- Applies to JS Branch deleted (
2.0, Trunk)
Updated by Debbie Lockett almost 4 years ago
- Fix Committed on JS Branch 2 added
- Fix Committed on JS Branch deleted (
Trunk)
Updated by Debbie Lockett almost 4 years ago
- 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