Bug #3062
closed
Validation of element node ignores xsi:type attribute
Category:
Schema-Aware processing
Applies to branch:
9.7, 9.8, trunk
Fix Committed on Branch:
9.7, 9.8, trunk
Fixed in Maintenance Release:
Description
validate{ $elem } throws and exception: : Cannot validate content against an abstract type. The element declaration for $elem has an abstract type, but the $elem instance has an xsi:type attribute that designates a concrete type, which should be used as the governing type for validation.
Files
- Description updated (diff)
- Category set to Schema-Aware processing
- Assignee set to Michael Kay
- Priority changed from High to Normal
It seems that when validation is requested at element level, an xsi:type attribute on the target of the validation request is ignored.
Note: bug #2100 changed some of the code in this area.
- Subject changed from xq: element validation of abstract type in xsd but concrete in xml to Validation of element node ignores xsi:type attribute
- Status changed from New to Resolved
- Applies to branch 9.8 added
- Fix Committed on Branch 9.7, 9.8 added
The code path also affects XSLT validation at element level (though I haven't verified the failure in this case).
Now fixed: the validation code for elements in CopyOf tests for the existence of an xsi:type attribute on the element being validated.
JUnit test added to module xqjtests/TestXQuery
QT3 test ValidateExpr/validate-as-107 added.
- Status changed from Resolved to Closed
- % Done changed from 0 to 100
- Fixed in Maintenance Release 9.7.0.15 added
Bug fix applied to the Saxon 9.7.0.15 maintenance release
- Fix Committed on Branch trunk added
- Fix Committed on Branch deleted (
9.8)
- Applies to branch deleted (
9.8)
- Status changed from Closed to In Progress
- Status changed from In Progress to Resolved
- Applies to branch 9.8, trunk added
- Fix Committed on Branch 9.8 added
I have made a further modification to the code (in CopyOf.processLeavingTail) so that the checking of the xsi:type value now occurs only if strict or lax validation is requested (and not validation=strip|skip|preserve).
Change applied on the 9.7, 9.8, and trunk branches
- Status changed from Resolved to Closed
- Fixed in Maintenance Release 9.8.0.8 added
Bug fix applied in the Saxon 9.8.0.8 maintenance release.
Please register to edit this issue
Also available in: Atom
PDF