W3C home > Mailing lists > Public > public-xsd-databinding@w3.org > August 2007

ISSUE-104: ComplexTypeChoiceExtension

From: Databinding Issue Tracker <dean+cgi@w3.org>
Date: Fri, 3 Aug 2007 13:27:38 +0000 (GMT)
To: public-xsd-databinding@w3.org
Message-Id: <20070803132738.89A0DBDAE@w3c4.w3.org>


ISSUE-104: ComplexTypeChoiceExtension

http://www.w3.org/2005/06/tracker/databinding/issues/104

Raised by: Jonathan Calladine
On product: Advanced

Our schemas in the wild trawl has thrown up some examples of this advanced 
pattern:

  <xs:element name="complexTypeChoiceExtension" 
type="ex:ComplexTypeChoiceExtension"/>

  <xs:complexType name="ComplexTypeChoiceBase">
            <xs:choice>
               <xs:element name="name" type="xs:string"/>
            </xs:choice>
         </xs:complexType>

  <xs:complexType name="ComplexTypeChoiceExtension">
            <xs:complexContent>
               <xs:extension base="ex:ComplexTypeChoiceBase">
                  <xs:choice>
                     <xs:element name="surname1" type="xs:string"/>
                     <xs:element name="surname2" type="xs:string"/>
                     <xs:element name="surname3" type="xs:string"/>
                  </xs:choice>
               </xs:extension>
            </xs:complexContent>
         </xs:complexType>


xpath 2.0 Detection Pattern 

.//xs:complexType/xs:complexContent[xs:extension[@base]/xs:choice]/
		(., xs:extension/
		(., @base, xs:choice/(., xs:element/(., @name))))

Instance doc

  <ex:complexTypeChoiceExtension>
            <ex:name>Jon</ex:name>
            <ex:surname1>Calladine</ex:description>
  </ex:complexTypeSequenceExtension>
Received on Friday, 3 August 2007 13:27:48 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 18 December 2010 18:20:37 GMT