Project

Profile

Help

Bug #2316

closed

xsl:validation="strict" fails when element uses type alternatives

Added by Michael Kay almost 10 years ago. Updated almost 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Schema-Aware processing
Sprint/Milestone:
Start date:
2015-02-18
Due date:
% Done:

100%

Estimated time:
Legacy ID:
Applies to branch:
9.6
Fix Committed on Branch:
9.6
Fixed in Maintenance Release:
Platforms:

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 on saxon-help list.

Actions #1

Updated by Michael Kay almost 10 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.

Actions #2

Updated by Michael Kay almost 10 years ago

Added xslt 3.0 test case validation-1301.

Actions #3

Updated by Michael Kay over 9 years ago

  • Status changed from In Progress to Resolved

The patch has now been committed and tested on the 9.6 and 9.7 branches.

Actions #4

Updated by O'Neil Delpratt over 9 years ago

  • 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.

Actions #5

Updated by O'Neil Delpratt almost 9 years ago

  • 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