Project

Profile

Help

Bug #2020

closed

Line number failing to show in error message

Added by O'Neil Delpratt about 10 years ago. Updated about 10 years ago.

Status:
Closed
Priority:
Normal
Category:
Internals
Sprint/Milestone:
-
Start date:
2014-03-05
Due date:
% Done:

100%

Estimated time:
Legacy ID:
Applies to branch:
Fix Committed on Branch:
Fixed in Maintenance Release:
Platforms:

Description

In the following simple stylesheet which should report the error 'FOTY0012: Cannot get the typed value of an element with element-only content' the line number of where the error occurs fails to show up:

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:template match="/">
        <xsl:value-of select="/books/book/authors"/>                                   
    </xsl:template>
</xsl:stylesheet>

The failure is on line 3. <xsl:value-of select="/books/book/authors"/>

In the schema we have:

 <xs:element name="authors">
    <xs:complexType>
      <xs:sequence>
        <xs:element maxOccurs="unbounded" ref="author"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>

which defines element only content type.

The fix: We catch the exception and provide location information where possible. This has been applied in the method process and iterate of CompiledExpression class. We also do the same in the interpreted code in the processLeavingTail method of the SimpleNodeConstructor class.

Actions #1

Updated by O'Neil Delpratt about 10 years ago

  • Status changed from New to Resolved
  • Priority changed from Low to Normal
  • % Done changed from 0 to 100
Actions #2

Updated by O'Neil Delpratt about 10 years ago

  • Status changed from Resolved to Closed
  • Fixed in version set to 9.5.1.5

Bug fix applied in Saxon maintenance release 9.5.1.5

Please register to edit this issue

Also available in: Atom PDF