Error location with generated bytecode
With generated bytecode, a stylesheet that does:
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).