ISSUE-64

union of simple types

State:
CLOSED
Product:
Advanced
Raised by:
Jonathan Calladine
Opened on:
2006-06-14
Description:
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>
Related emails:
  1. ISSUE-64: union of simple types (from dean+cgi@w3.org on 2006-06-14)
  2. Minutes: XML Schema Patterns for Databinding F2F 5th-6th October 2006 (from paul.downey@bt.com on 2006-10-07)

Related notes:

2006-10-05: accepted as a pattern, example is "Union"