Altova Mailing List Archives>Archive Index >xmlschema-dev Archive Home >Recent entries >Thread Prev - [XML Schema 1.1] The XPath in cannot "look up" the XML tree, right? >Thread Next - need advice [XML Schema 1.1] Can I invent elements if I specify vc:maxVersion="3.2"?To: "'xmlschema-dev@--.---'" <-------------@--.---> Date: 4/29/2009 9:21:00 AM
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:minVer=
sion="1.1" vc:maxVersion="3.2">
...
</xs:element>
<xs:element name="Book" maxOccurs="unbounded" vc:minVer=
sion="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:minVer=
sion="1.1" vc:maxVersion="3.2">
...
</xs:element>
<xs:element name="Book" maxOccurs="unbounded" vc:minVer=
sion="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 erro=
r 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=
From costello@m... Thu Apr 30 15:36:56 2009
Received: from maggie.w3.org ([193.51.208.68])
by frink.w3.org with | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
