<?xml version="1.0"?>
<!-- edited with XMLSPY v2004 rel. 3 U (http://www.xmlspy.com) by Roland A. Merrick (W3C) -->
<xs:schema targetNamespace="http://www.w3.org/2004/06/diselect" xmlns="http://www.w3.org/2004/06/diselect" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="unqualified">
	<!--
    Changes:
      2004-05-10 RAM created
	    2004-05-27 RL	removed import for xml schema schema
								    moved the xs:anyAttribute elements after the specific attributes
								    changed the schema prefix to xs:
      2005-03-06 RAM added selidName attribute
                     if ##any changed to ##other
                     when ##any changed to ##other
                     otherwise ##any changed to ##other
                     add: variable; value; options; idreplace; process; required.
      2005-04-04 RAM changet namespace to /2004/06/
    -->
	<!-- elements -->
	<xs:element name="select">
		<xs:annotation>
			<xs:documentation>container of set of alternative content.</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="when" minOccurs="0" maxOccurs="unbounded"/>
				<xs:element ref="otherwise" minOccurs="0"/>
			</xs:sequence>
			<xs:attribute name="expr" type="selExpr" use="optional"/>
			<xs:attribute name="precept" type="precept" use="optional"/>
			<xs:anyAttribute namespace="##other"/>
		</xs:complexType>
	</xs:element>
	<xs:element name="when">
		<xs:annotation>
			<xs:documentation>container of one -- alternative--.</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:sequence>
				<xs:any namespace="##other" processContents="skip" minOccurs="0"/>
				<xs:element ref="select" minOccurs="0" maxOccurs="unbounded"/>
				<xs:element ref="if" minOccurs="0" maxOccurs="unbounded"/>
			</xs:sequence>
			<xs:attribute name="expr" type="selExpr" use="required"/>
			<xs:anyAttribute namespace="##other"/>
		</xs:complexType>
	</xs:element>
	<xs:element name="otherwise">
		<xs:annotation>
			<xs:documentation>container of one -- alternative--.</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:sequence>
				<xs:any namespace="##other" processContents="skip" minOccurs="0"/>
				<xs:element ref="select" minOccurs="0" maxOccurs="unbounded"/>
				<xs:element ref="if" minOccurs="0" maxOccurs="unbounded"/>
			</xs:sequence>
			<xs:anyAttribute namespace="##other"/>
		</xs:complexType>
	</xs:element>
	<xs:element name="if">
		<xs:annotation>
			<xs:documentation>container of -- optional content --.</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:sequence>
				<xs:any namespace="##other" processContents="skip" minOccurs="0"/>
				<xs:element ref="select" minOccurs="0" maxOccurs="unbounded"/>
				<xs:element ref="if" minOccurs="0" maxOccurs="unbounded"/>
			</xs:sequence>
			<xs:attribute name="expr" type="selExpr" use="required"/>
			<xs:anyAttribute namespace="##other"/>
		</xs:complexType>
	</xs:element>
	<xs:element name="variable">
		<xs:annotation>
			<xs:documentation>definition of a variable.</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:attribute name="name" type="xs:NCName" use="optional"/>
			<xs:attribute name="ref" type="xs:NCName" use="optional"/>
			<xs:attribute name="value" type="xs:string" use="required"/>
			<xs:anyAttribute namespace="##other"/>
		</xs:complexType>
	</xs:element>
	<xs:element name="value">
		<xs:annotation>
			<xs:documentation>include the value into the content.</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:attribute name="expr" type="selExpr" use="required"/>
			<xs:anyAttribute namespace="##other"/>
		</xs:complexType>
	</xs:element>
	<xs:element name="options">
		<xs:annotation>
			<xs:documentation>container of processing options.</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:sequence>
				<xs:any namespace="##other" processContents="skip" minOccurs="0"/>
				<xs:element ref="required" minOccurs="0" maxOccurs="unbounded"/>
				<xs:element ref="process" minOccurs="0"/>
				<xs:element ref="idreplace" minOccurs="0"/>
			</xs:sequence>
			<xs:attribute name="expr" type="selExpr" use="optional"/>
			<xs:anyAttribute namespace="##other"/>
		</xs:complexType>
	</xs:element>
	<xs:element name="idreplace">
		<xs:annotation>
			<xs:documentation>Name of the attribute that will be assigned the value of selid.</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:attribute name="name" type="xs:QName" use="required"/>
			<xs:anyAttribute namespace="##other"/>
		</xs:complexType>
	</xs:element>
	<xs:element name="process">
		<xs:annotation>
			<xs:documentation>Processing options.</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:attribute name="type" type="processType" use="required"/>
			<xs:anyAttribute namespace="##other"/>
		</xs:complexType>
	</xs:element>
	<xs:element name="required">
		<xs:annotation>
			<xs:documentation>Specify required XPath functions.</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:attribute name="functions" type="QNameList" use="required"/>
			<xs:anyAttribute namespace="##other"/>
		</xs:complexType>
	</xs:element>
	<!-- attributes -->
	<xs:attribute name="expr" type="selExpr">
		<xs:annotation>
			<xs:documentation>XPath expression which resolves to a boolean to control inclusion of optional content.</xs:documentation>
		</xs:annotation>
	</xs:attribute>
	<xs:attribute name="selid" type="xs:NCName">
		<xs:annotation>
			<xs:documentation>Will become the ID after processing.</xs:documentation>
		</xs:annotation>
	</xs:attribute>
	<xs:attribute name="selidName" type="xs:QName">
		<xs:annotation>
			<xs:documentation>Name of the attribute that will be assigned the value of selid.</xs:documentation>
		</xs:annotation>
	</xs:attribute>
	<!-- type definitions -->
	<xs:simpleType name="precept">
		<xs:restriction base="xs:string">
			<xs:enumeration value="matchfirst"/>
			<xs:enumeration value="matchevery"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="selExpr">
		<xs:restriction base="XPathExpression"/>
	</xs:simpleType>
	<xs:simpleType name="XPathExpression">
		<xs:restriction base="xs:string"/>
	</xs:simpleType>
	<xs:simpleType name="processType">
		<xs:restriction base="xs:string">
			<xs:enumeration value="every"/>
			<xs:enumeration value="once"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="QNameList">
		<xs:list itemType="xs:QName"/>
	</xs:simpleType>
</xs:schema>
