Bug #5626
closed
Incorrect inference regarding static context item type in xsl:evaluate
Applies to branch:
11, trunk
Fix Committed on Branch:
11, trunk
Fixed in Maintenance Release:
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.
- 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.
- 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.
- Fixed in Maintenance Release 11.5 added
Bug applied in the Saxon 11.5 Maintenance release.
- Status changed from Resolved to Closed
Please register to edit this issue
Also available in: Atom
PDF