Bug #2316
closed
xsl:validation="strict" fails when element uses type alternatives
Category:
Schema-Aware processing
Fix Committed on Branch:
9.6
Fixed in Maintenance Release:
Description
Requestion validation at element level from XSLT using xsl:validation="strict" on a literal result element fails when the element declaration in question uses type alternatives: Saxon allocates a validator for the declared type of the element at stylesheet compile time, without taking the type alternatives into account.
Reported by Patrik.Stellmann@gdv-dl.de on saxon-help list.
- Status changed from New to In Progress
I have prepared a fix (on the 9.6 baseline) which fixes this specific problem, but it's changing some complex and commonly-used paths in the code so it will need careful regression testing.
The fix involves (a) adding a method hasTypeAlternatives() to SchemaDeclaration and giving it an implementation in AttributeDecl; (b) in FixedElement, changing computeFixedElementItemType() to avoid early determination of the type if there are type alternatives; (c) in EnterpriseConfiguration.getElementValidator(), avoid creating a contentValidator if there are type alternatives.
Added xslt 3.0 test case validation-1301.
- Status changed from In Progress to Resolved
The patch has now been committed and tested on the 9.6 and 9.7 branches.
- Status changed from Resolved to Closed
- % Done changed from 0 to 100
- Fixed in version set to 9.6.0.5
Bug fix applied in the Saxon 9.6.0.5 maintenance release.
- Sprint/Milestone set to 9.6.0.5
- Applies to branch 9.6 added
- Fix Committed on Branch 9.6 added
- Fixed in Maintenance Release 9.6.0.5 added
Please register to edit this issue
Also available in: Atom
PDF