W3C home > Mailing lists > Public > public-xsd-databinding@w3.org > June 2006

RE: ISSUE-9: union pattern for pending document

From: <jon.calladine@bt.com>
Date: Wed, 14 Jun 2006 18:13:44 +0100
Message-ID: <657E2B34242ACC46BDD6774A9728F9E3686E77@E03MVZ3-UKDY.domain1.systemhost.net>
To: <public-xsd-databinding@w3.org>

Discharging Action-45 from last weeks call:

 here is the first pattern for xs:union in ready to use format for the
patterns doc:

<div2 id="pattern-Union" class="pattern"><head>Union</head>
	<glist>
	    <label>URI</label>
	    <def><eg
class="URI">http://www.w3.org/2002/ws/databinding/patterns/6/05/Union</e
g></def>
	    <label>Definition</label>
	    <def>-</def>
 
	    <label>Examples</label>
	    <def>
	      <example id="eg-element-BasicUnion-meeting">
		<head>Basic Union</head>
		<glist>
		    <def><eg xml:space="preserve"
class="schemaexample"><![CDATA[
	<xs:simpleType name="UnionType">
		<xs:union memberTypes="xs:string xs:date"/>
	</xs:simpleType>
 
	<xs:element name="elementBasicUnionMeeting"
type="ex:UnionType"/>
]]>
 
</eg></def>
		    <label>Instance:</label>
		    <def><eg xml:space="preserve"
class="instanceexample"><![CDATA[
<ex:elementBasicUnionMeeting>2006-06-06</ex:elementBasicUnionMeeting>
]]></eg></def>
		    <label>Instance:</label>
		    <def><eg xml:space="preserve"
class="instanceexample"><![CDATA[
<ex:elementBasicUnionMeeting>6th June 2006</ex:elementBasicUnionMeeting>
]]></eg></def>
		</glist>
	      </example>
	    </def>
	</glist>
      </div2>


The important bits here are of course:

	<xs:simpleType name="UnionType">
		<xs:union memberTypes="xs:string xs:date"/>
	</xs:simpleType>
 
	<xs:element name="elementBasicUnionMeeting"
type="ex:UnionType"/>

With the valid instance data

<ex:elementBasicUnionMeeting>2006-06-06</ex:elementBasicUnionMeeting>

And

<ex:elementBasicUnionMeeting>6th June 2006</ex:elementBasicUnionMeeting>

JonC
Received on Wednesday, 14 June 2006 17:13:56 GMT

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