- From: <jon.calladine@bt.com>
- Date: Wed, 14 Jun 2006 18:47:41 +0100
- To: <public-xsd-databinding@w3.org>
Discharging ACTION-49 http://www.w3.org/2005/06/tracker/databinding/actions/49 A pattern for choice schema would be: <xs:element name="elementChoiceHat" type="ex:Hat"/> <xs:complexType name="Hat"> <xs:choice> <xs:element name="trilby" type="xs:string"/> <xs:element name="panama" type="xs:string"/> <xs:element name="bearskin" type="xs:string"/> </xs:choice> </xs:complexType> With instance data: <ex:elementChoiceHat> <ex:panama>Carludovica palmata</ex:panama> </ex:elementChoiceHat> <ex:elementChoiceHat> <ex:trilby>felt</ex:trilby> </ex:elementChoiceHat> In ready to consume form for the document: <div2 id="pattern-Choice" class="pattern"><head>Choice</head> <glist> <label>URI</label> <def><eg class="URI">http://www.w3.org/2002/ws/databinding/patterns/6/05/Choice</ eg></def> <label>Definition</label> <def>-</def> <label>Examples</label> <def> <example id="eg-element-Choice-hat"> <head>Choice</head> <glist> <def><eg xml:space="preserve" class="schemaexample"><![CDATA[ <xs:element name="elementChoiceHat" type="ex:Hat"/> <xs:complexType name="Hat"> <xs:choice> <xs:element name="trilby" type="xs:string"/> <xs:element name="panama" type="xs:string"/> <xs:element name="bearskin" type="xs:string"/> </xs:choice> </xs:complexType> ]]></eg></def> <label>Instance:</label> <def><eg xml:space="preserve" class="instanceexample"><![CDATA[ <ex:elementChoiceHat> <ex:trilby>felt</ex:trilby> </ex:elementChoiceHat> ]]></eg></def> <label>Instance:</label> <def><eg xml:space="preserve" class="instanceexample"><![CDATA[ <ex:elementChoiceHat> <ex:panama>Carludovica palmata</ex:panama> </ex:elementChoiceHat> ]]></eg></def> </glist> </example> </def> </glist> </div2>
Received on Wednesday, 14 June 2006 17:48:00 UTC