Project

Profile

Help

Bug #3919

closed

Saxon validation fails where Xerces succeeds

Added by Eliot Kimber about 6 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Schema-Aware processing
Sprint/Milestone:
-
Start date:
2018-09-26
Due date:
% Done:

100%

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

Description

I have two schemas, munipub_basket.xsd and munipub.xsd, where the first schema includes the second schema (separate namespace).

An element defined in the included schema is reported as invalid when validated through the first schema but not when validated against only the second schema.

The declaration in question (from munipub.xsd) is:

	<xs:element name="td">
		<xs:complexType>
			<xs:complexContent>
				<xs:extension base="block_xor_inline_children">
					<xs:attributeGroup ref="tablecellattributes"/>
				</xs:extension>
			</xs:complexContent>
		</xs:complexType>
	</xs:element>

	<xs:complexType name="block_xor_inline_children" mixed="true">
		<xs:choice>
			<xs:group ref="blockelements" minOccurs="0" maxOccurs="unbounded"/>
			<xs:group ref="inlineelements" minOccurs="0" maxOccurs="unbounded"/>
		</xs:choice>
		<xs:attributeGroup ref="globals"/>
	</xs:complexType>

The validation failure is on <td> with #PCDATA:

         <tr>
            <td>text directly in td</td>
          </tr>

Using Oxygen to run the validator, if Saxon EE is set as the default validator, the td is reported as invalid but with Xerces it is valid. My weak understanding of the XSD spec suggests that the td should be valid (in that the mixed="true" from the referenced complex type should be respected for <td>.

If I create a document that uses the munipub.xsd directly with the same table Saxon reports it as valid. So something with the inclusion of the schema is causing an issue with Saxon.

XSDs and test docs attached.


Files

saxon-xsd-validation-issue.zip (91.3 KB) saxon-xsd-validation-issue.zip XSDs and test docs. Eliot Kimber, 2018-09-26 22:16

Please register to edit this issue

Also available in: Atom PDF