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

ISSUE-64: union of simple types

From: Databinding Issue Tracker <dean+cgi@w3.org>
Date: Wed, 14 Jun 2006 17:24:38 +0000 (UTC)
To: public-xsd-databinding@w3.org
Message-Id: <20060614172438.363A9DAF01@w3c4-bis.w3.org>


ISSUE-64: union of simple types

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

Raised by: Jonathan Calladine
On product: Advanced

ACTION-46 was to raise a new issue for the slightly different pattern for 
xs:union operating on simple types. 

The schema fragment is:

	<xs:simpleType name="UnionOfSimpleTypesType">
		<xs:union>
		<xs:simpleType>
			<xs:restriction base="xs:string"></xs:restriction>
		</xs:simpleType>
		<xs:simpleType>
			<xs:restriction base="xs:date"></xs:restriction>
		</xs:simpleType>
		</xs:union>
	</xs:simpleType>
 
	<xs:element name="elementUnionSimpleTypesMeeting" 
type="ex:UnionOfSimpleTypesType"/>


with valid instance data:

<ex:elementUnionSimpleTypesMeeting>Monday Night
</ex:elementUnionSimpleTypesMeeting>

and

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


In ready to use format this is:

     <div2 id="pattern-UnionSimpleTypes" class="pattern"><head>Union of 
SimpleTypes</head>
	<glist>
	    <label>URI</label>
	    <def><eg 
class="URI">http://www.w3.org/2002/ws/databinding/patterns/6/05/UnionSimpleType
s</eg></def>
	    <label>Definition</label>
	    <def>-</def>
 
	    <label>Examples</label>
	    <def>
	      <example id="eg-element-UnionSimpleTypes-meeting">
		<head>Union of Simple Types</head>
		<glist>
		    <def><eg xml:space="preserve" class="schemaexample"><!
[CDATA[
	<xs:simpleType name="UnionOfSimpleTypesType">
		<xs:union>
		<xs:simpleType>
			<xs:restriction base="xs:string"></xs:restriction>
		</xs:simpleType>
		<xs:simpleType>
			<xs:restriction base="xs:date"></xs:restriction>
		</xs:simpleType>
		</xs:union>
	</xs:simpleType>
 
	<xs:element name="elementUnionSimpleTypesMeeting" 
type="ex:UnionOfSimpleTypesType"/>
]]>
 
</eg></def>
		    <label>Instance:</label>
		    <def><eg xml:space="preserve" class="instanceexample"><!
[CDATA[
<ex:elementUnionSimpleTypesMeeting>Monday Night
</ex:elementUnionSimpleTypesMeeting>
]]></eg></def>
		    <label>Instance:</label>
		    <def><eg xml:space="preserve" class="instanceexample"><!
[CDATA[
<ex:elementUnionSimpleTypesMeeting>2006-06-06
</ex:elementUnionSimpleTypesMeeting>
]]></eg></def>
		</glist>
	      </example>
	    </def>
	</glist>
      </div2>
Received on Wednesday, 14 June 2006 17:24:41 GMT

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