Hi Sandy & all,
I have few questions about the fixes provided in this jira issue
(i.e support of schema 1.1 rules of subsumption checks of complex type
particles).
Before this fix, I had following example working fine (i.e validation
succeeded) in both normal schema validation mode and with Xerces full
schema checking mode (i.e with -f option of sample
jaxp.SourceValidator, which sets a boolean flag for this on JAXP
SchemaFactory).
(in this example I use the new schema 1.1 attribute "targetNamespace"
on xs:element)
XML document:
<x xmlns="http://test1">
<y xmlns="http://test2" />
</x>
XML Schema 1.1 document:
<xs:schema xmlns:test1="http://test1"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://test1">
<xs:element name="x">
<xs:complexType>
<xs:complexContent>
<xs:restriction base="test1:TEST_TYPE">
<xs:sequence>
<xs:element name="y"
targetNamespace="http://test2">
<xs:complexType/>
</xs:element>
</xs:sequence>
</xs:restriction>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:complexType name="TEST_TYPE">
<xs:sequence>
<xs:element name="y">
<xs:complexType/>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:schema>
But after these fixes, the above validation succeeds without full
schema checking, but not with Xerces full schema checking mode. With
Xerces full schema checking mode, I get following validation errors
now (i.e after these fixes):
[Error] derivation-ok-restriction.5.4.2: Error for type '#AnonType_x'.
The particle of the type is not a valid restriction of the particle
of the base.
Here are few questions please related to these new observations:
1. Is the above error message correct for the above example, wrt the
schema 1.1 spec?
2. If the error message specified above conforms to XML Schema 1.1
spec, what is the right way to write a 1.1 schema for the above
requirement, with Xerces full schema checking validation mode?
--
Regards,
Mukul Gandhi
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]