[XMLSCHEMA-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

UPA Question

From: Erik Johnson <ejohnson@epicor.com>
Date: Mon, 27 Nov 2006 17:18:14 -0800
Message-ID: <BF9C5B9528B9C246BC41C7B988C49C87026C597E@slate.americas.epicor.net>
To: <xmlschema-dev@w3.org>
UPA Question
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>

 

 




  • application/x-pkcs7-signature attachment: smime.p7s
Received on Tuesday, 28 November 2006 01:18:33 GMT

Subscribe to the Stylus Scoop newsletter for helpful XML tips and tutorials.
Email
First Name
Last Name
Company

Download Stylus Studio 6 XML Enterprise Edition

Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.