Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: UPA Question

From: George Cristian Bina <george@---------.--->
To: Erik Johnson <ejohnson@------.--->
Date: 11/28/2006 9:12:00 AM
Hi Erik,

The schema is ambiguous so the correct behavior is to report a UPA 
violation.

Best Regards,
George
---------------------------------------------------------------------
George Cristian Bina
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
www.---.com

Erik Johnson wrote:
> I have two toolkits (from the same company, BTW) that compile the schema
> shown below differently.  One says the schema is fine while the other says
> the choice inside grpC/ElementC1 violates the UPA rule.  This example looks
> a bit contrived, but it's a reduction from something a lot more complex that
> obviously could be re-factored.   On the surface, I can see why one might
> think having grpA in choice particles at two levels within ElementC1 makes
> the content ambiguous.  But after thinking about it, I don't think that the
> content model is ambiguous.  My question is which toolkit is right and which
> one gets my bug report?  Thanks!
> 
>  
> 
> <xs:schema id="XMLSchema1" 
> 
>                   targetNamespace="uri:erik:upaQuestion"
> 
>                   elementFormDefault="qualified"
> 
>                   xmlns="uri:erik:upaQuestion"
> 
>                   xmlns:tns="uri:erik:upaQuestion"
> 
>                   xmlns:xs="http://www.w3.org/2001/XMLSchema">
> 
>  
> 
>       <xs:group name="grpA">
> 
>             <xs:sequence>
> 
>                   <xs:element name="ElementA1"/>
> 
>             </xs:sequence>
> 
>       </xs:group>
> 
>  
> 
>       <xs:group name="grpB">
> 
>             <xs:choice>
> 
>                   <xs:element name="ElementB1" />
> 
>                   <xs:group ref="tns:grpA"/>
> 
>             </xs:choice>
> 
>       </xs:group>
> 
>  
> 
>       <xs:group name="grpC">
> 
>             <xs:sequence>
> 
>                   <xs:element name="ElementC1">
> 
>                         <xs:complexType>
> 
>                               <xs:sequence>
> 
>                                     <xs:choice>
> 
>                                           <xs:group ref="tns:grpB"/>
> 
>                                           <xs:group ref="tns:grpA"/>
> 
>                                     </xs:choice>
> 
>                               </xs:sequence>
> 
>                         </xs:complexType>
> 
>                   </xs:element>
> 
>             </xs:sequence>
> 
>       </xs:group>
> 
>  
> 
>       <xs:element name="RootElement">
> 
>             <xs:complexType>
> 
>                   <xs:choice>
> 
>                         <xs:group ref="tns:grpC"/>
> 
>                         <xs:sequence>
> 
>                               <xs:element name="OtherStuff" />
> 
>                         </xs:sequence>
> 
>                   </xs:choice>
> 
>             </xs:complexType>
> 
>       </xs:element>
> 
>  
> 
> </xs:schema>
> 
>  
> 
>  
> 
> 

From boris@k... Tue Nov 28 06:14:49 2006
Received: from lisa.w3.org ([128.30.52.41])
	by frink.w3.org with esmtp (Exim 4.50)
	id 1GowEz-0002C5-F2
	


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