Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


RE: redefine and empty xs:group

From: "Michael Kay" <mike@--------.--->
To: <jozef.aerts@----------.--->, <xmlschema-dev@--.--->
Date: 12/10/2004 9:59:00 AM

Saxon accepts this schema without complaint.

6.2.2 is part of 6.2, which starts "If it has no such self-reference,
then..." Your redefined group does have a self-reference, so 6.2.2 does not
apply.

I think Saxon and Xerces are right and XMLSpy is wrong.


Michael Kay
http://www.saxonica.com/
 

> -----Original Message-----
> From: xmlschema-dev-request@w... 
> [mailto:xmlschema-dev-request@w...] On Behalf Of 
> jozef.aerts@x...
> Sent: 10 December 2004 09:12
> To: xmlschema-dev@w...
> Subject: redefine and empty xs:group
> 
> 
> 
> Dear all,
> 
> I have the following simple base schema (Base.xsd):
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
> elementFormDefault="qualified" attributeFormDefault="unqualified">
>   <!-- empty group -->
>   <xs:group name="base">
>     <xs:sequence></xs:sequence>
>   </xs:group>
>   <!-- root element -->
>   <xs:element name="rootelement">
>     <xs:complexType>
>       <xs:sequence>
>         <xs:element name="myelement"
> type="myelement-definition"></xs:element>
>       </xs:sequence>
>     </xs:complexType>
>   </xs:element>
>   <!-- another element -->
>   <xs:complexType name="myelement-definition">
>     <xs:sequence>
>       <xs:group ref="base" minOccurs="0" maxOccurs="unbounded"/>
>     </xs:sequence>
>   </xs:complexType>
> </xs:schema>
> 
> and its implementation (BaseImplementation.xsd):
> <?xml version="1.0" encoding="UTF-8"?>
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
> elementFormDefault="qualified" attributeFormDefault="unqualified">
>   <!-- redefine the base schema -->
>   <xs:redefine schemaLocation="Base.xsd">
>      <!-- add a new element to the empty base -->
>      <xs:group name="base">
>       <xs:sequence>
>         <xs:group ref="base"/>
>         <xs:element name="testelement" minOccurs="0"
> maxOccurs="unbounded"/>
>       </xs:sequence>
>     </xs:group>
>   </xs:redefine>
> </xs:schema>
> 
> Xerces(2-6-2) and Xerces-based tools like Exchanger XML 
> Editor find this
> OK.
> XMLSpy (2005SP1) however complains: "Redefining model group definition
> 'base' must be a valid restriction of its redefined pendant.
> I asked the people of Altova (Spy) and received the answer that
> "According to the
> W3C Specifications......src-redefine.6.2.2 prescribes that the
> redefining model group must be a restriction of the redefined one"
> 
> So my question: who is right ? Does Xerces not check well on
> src-redefine.6.2.2 or does Spy have another interpretation of the spec
> ?
> 
> Many thanks in advance,
> 
> Jozef Aerts
> XML4Pharma
> 
> 


From nobody@w... Fri Dec 10 12:37:42 2004
Received: from wiggum.w3.org ([128.30.52.23])
	by frink.w3.org with esm


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent