Project

Profile

Help

Bug #4583

closed

Failed to compile "('0', 0)[1] ! xs:integer(.)"

Added by Michael Kay over 4 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
-
Start date:
2020-06-13
Due date:
% Done:

100%

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

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)
Actions #1

Updated by Michael Kay over 4 years ago

  • Applies to JS Branch 2.0 added
Actions #2

Updated by Michael Kay over 4 years ago

Added test case to XSLT3 suite as predicate-057

Actions #3

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.

Actions #4

Updated by Michael Kay over 4 years ago

  • Subject changed from Failed to compile "('0', 0)[1] ! xs:integer(.)" to Documentation - superscript not rendered
Actions #5

Updated by Michael Kay over 4 years ago

  • Subject changed from Documentation - superscript not rendered to Failed to compile "('0', 0)[1] ! xs:integer(.)"
Actions #6

Updated by Michael Kay over 4 years ago

  • Assignee changed from Michael Kay to John Lumley
Actions #7

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

Actions #8

Updated by John Lumley over 4 years ago

  • Fix Committed on JS Branch Trunk added
Actions #9

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)

Actions #10

Updated by Debbie Lockett over 4 years ago

  • Status changed from In Progress to Resolved

Remarking as resolved - wrong error codes are not critical.

Actions #11

Updated by Community Admin almost 4 years ago

  • Applies to JS Branch 2 added
  • Applies to JS Branch deleted (2.0, Trunk)
Actions #12

Updated by Debbie Lockett almost 4 years ago

  • Fix Committed on JS Branch 2 added
  • Fix Committed on JS Branch deleted (Trunk)
Actions #13

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