xsl:validation="strict" fails when element uses type alternatives
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.
#1 Updated by Michael Kay almost 7 years ago
- 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.
Please register to edit this issue