Hi Folks,
It's my understanding that a 1.1 schema validator will strip out the second Book:
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning"
targetNamespace="http://www.books.org"
elementFormDefault="qualified">
<xs:element name="BookStore">
<xs:complexType>
<xs:sequence>
<xs:element name="Book" maxOccurs="unbounded" vc:minVersion="1.1" vc:maxVersion="3.2">
...
</xs:element>
<xs:element name="Book" maxOccurs="unbounded" vc:minVersion="3.2">
...
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
Correct?
Since the 1.1 schema validator strips out the second Book, I figure that I should be able to put any crazy elements I want in there. For example, here I invent a new element that I call "new":
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning"
targetNamespace="http://www.books.org"
elementFormDefault="qualified">
<xs:element name="BookStore">
<xs:complexType>
<xs:sequence>
<xs:element name="Book" maxOccurs="unbounded" vc:minVersion="1.1" vc:maxVersion="3.2">
...
</xs:element>
<xs:element name="Book" maxOccurs="unbounded" vc:minVersion="3.2">
<xs:new>
...
</xs:new>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
However, when I run this schema using a 1.1 validator (SAXON) I get an error message saying <xs:new> is not allowed within <xs:element>.
Why?
It seems to me, SAXON should never have seen <xs:new>.
Would you clarify this for me please?
/Rgoer