Bug #5626
closedIncorrect inference regarding static context item type in xsl:evaluate
0%
Description
The static type checking for the expression evaluated using xsl:evaluate assumes that the context item type will be the same as the context item type for the xsl:evaluate instruction itself.
I haven't found any adverse consequences on the 11.x branch, but it's causing a crash on 12.x because we aren't checking for the context item being absent in test evaluate-024.
Updated by Michael Kay over 2 years ago
- Category set to Internals
- Status changed from New to Resolved
- Applies to branch 11, trunk added
- Fix Committed on Branch 11, trunk added
- Platforms .NET, Java added
I haven't been able to devise a test case that demonstrates the problem in Saxon 11.
The only thing we are getting wrong is the inference of whether the context item may or may not be absent, and I think we only use that knowledge when we are generating bytecode (it means we can avoid generating a run-time check for the condition). But we never generate bytecode for the expression evaluated using xsl:evaluate
, so the fact that our inference is wrong has no impact.
Nevertheless, I will apply the correction.
For the 12.x branch I've changed the xsl:evaluate
code to set the inferred context item static type more precisely, by looking at what can be inferred from the supplied context-item
expression.
Updated by O'Neil Delpratt almost 2 years ago
- Fixed in Maintenance Release 12.0 added
Bug issue fix applied in the Saxon 12.0 Major Release. Leaving this bug marked as Resolved until fix applied on the Saxon 11 branch.
Updated by O'Neil Delpratt almost 2 years ago
- Fixed in Maintenance Release 11.5 added
Bug applied in the Saxon 11.5 Maintenance release.
Updated by O'Neil Delpratt almost 2 years ago
- Status changed from Resolved to Closed
Please register to edit this issue