|
[XMLSCHEMA-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] [XML Schema 1.1] Can I invent elements if I specify vc:maxVersion="3.2"?
From: Costello, Roger L. <costello@mitre.org>
Date: Wed, 29 Apr 2009 13:20:33 -0400 To: "'xmlschema-dev@w3.org'" <xmlschema-dev@w3.org> Message-ID: <9E51F88D5247B648908850C35A3BBB5003F245AA9F@IMCMBX3.MITRE.ORG> 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? /RgoerReceived on Wednesday, 29 April 2009 17:21:09 GMT |
Subscribe in XML format
|

![[XML Schema 1.1] Can I invent elements if I specify vc:maxVersion="3.2"?](/images/get_stylus.gif)




