Bug #1861
closedError location with generated bytecode
100%
Description
With generated bytecode, a stylesheet that does:
<xsl:template match="/">
<xsl:sequence select="p/@a"/>
</xsl:template>
correctly reports the error:
XTDE0420: Cannot create an attribute node (xml:lang) whose parent is a document node
but gives incorrect location information. It some cases it may give no location information at all, in others it gives an incorrect line number such as 1048575 (which is the translation of the "unknown" location ID -1 to a line number).
Two patches are being applied (subject to regression testing):
(a) ToIteratorCompiler.compileToPush() now generates a call on the three-argument form of SequenceReceiver.append(), which includes the locationId of the expression being compiled, rather than the single-argument version, which supplies no location information
(b) ComplexContentOutputter.attribute(), when it detects this particular error, does not attempt to set the location of the error if the locationId is unknown (-1).
Updated by O'Neil Delpratt over 10 years ago
- Status changed from Resolved to Closed
- % Done changed from 0 to 100
- Fixed in version set to 9.5.1.2
Bug fix applied in the Saxon maintenance release 9.5.1.2
Please register to edit this issue