<?xml version="1.0" encoding="UTF-8"?>
<!--
	Document Title: XML Schema for Presentation Template Markup Language
	Document URL: http://myurc.org/ns/pret
	Schema Documentation: http://myurc.org/ns/pret/pret.html
	Author: Gottfried Zimmermann, Trace Center
	Publisher: Universal Remote Console Consortium
	Reference: ISO/IEC 24752-3:2007, Information Technology - User Interfaces - Universal Remote Console,
		Part 3: Presentation Template
	Copyright 2007, URCC

	Abstract: This is the XML Schema Definition file for the Presentation Template language, 
as specified by ISO/IEC 24752 part 3.  In case of any differences between this specification and 
ISO/IEC 24752-3, the normative ISO standard shall take precedence.  In fact, this XSD file doesn't exactly 
reflect the PreT syntax as specified in ISO/IEC 24752-3 due to limitations of the XSD syntax.  The user's 
attention is drawn to the included annotations which may hint at such deviations.

	Versioning: This XML Schema Definition file will be updated in the future to reflect new revisions of the 
URC standard, if the new revision is backward compatible.  Otherwise a new XML Schema Definition
file will be created with a new URL.

MIME type of Presentation Template: “application/urc-pret+xml”.

	Disclaimer: THIS DOCUMENT IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 
PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE 
COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY 
SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING 
FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OF THIS DOCUMENT.
-->
<xsd:schema xmlns:pret="http://myurc.org/ns/pret" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" targetNamespace="http://myurc.org/ns/pret" elementFormDefault="qualified" attributeFormDefault="unqualified" version="ISO/IEC FDIS 24752-3:2007" xsi:schemaLocation="http://www.w3.org/2001/XMLSchema http://www.w3.org/2001/XMLSchema.xsd">
	<xsd:annotation>
		<xsd:documentation xml:lang="en">
			<dc:title xml:lang="en-US">XML Schema for Presentation Template Markup Language</dc:title>
			<dc:creator>Gottfried Zimmermann, Trace Center</dc:creator>
			<dc:publisher xml:lang="en-US">Universal Remote Console Consortium</dc:publisher>
			<dc:description xml:lang="en-US">This is the XML schema for ISO/IEC 24752-3:2007</dc:description>
			<dc:language xml:lang="en-US">English</dc:language>
			<dcterms:issued>2004-01-28</dcterms:issued>
			<dcterms:modified>2007-03-16</dcterms:modified>
			<dc:rights xml:lang="en-US">Copyright 2007 URCC</dc:rights>
		</xsd:documentation>
	</xsd:annotation>
	<xsd:import namespace="http://purl.org/dc/elements/1.1/" schemaLocation="http://dublincore.org/schemas/xmls/qdc/2006/01/06/dc.xsd"/>
	<xsd:import namespace="http://purl.org/dc/terms/" schemaLocation="http://dublincore.org/schemas/xmls/qdc/2006/01/06/dcterms.xsd"/>
	<!-- root element -->
	<xsd:element name="pret" type="pret:pretType">
		<xsd:annotation>
			<xsd:documentation xml:lang="en">Root element of a Presentation Template.</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<!-- element types	-->
	<xsd:complexType name="pretType">
		<xsd:choice minOccurs="0" maxOccurs="unbounded">
			<xsd:any namespace="http://purl.org/dc/elements/1.1/ http://purl.org/dc/terms/" processContents="lax">
				<xsd:annotation>
					<xsd:documentation xml:lang="en">Due to XSD syntax limitations, this is not as restrictive as ISO/IEC 24752-3: dcterms:conformsTo is required as a minimum.</xsd:documentation>
				</xsd:annotation>
			</xsd:any>
			<xsd:element name="group" type="pret:groupType">
				<xsd:annotation>
					<xsd:documentation xml:lang="en">Hierarchical structure of related elements.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:group ref="pret:interactorGroup"/>
			<xsd:element name="modalDialog" type="pret:modalDialogType">
				<xsd:annotation>
					<xsd:documentation xml:lang="en">A modal dialog is an Interactor that suspends normal operation of the user interface until the dialog has been handled.  It is used to present information, warnings and errors generated by a Target. Binds to a notify element.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
		</xsd:choice>
		<xsd:attribute name="name" type="xsd:anyURI" use="required">
			<xsd:annotation>
				<xsd:documentation xml:lang="en">Globally unique name (URI) of Presentation Template.</xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
		<xsd:attribute name="id" type="xsd:ID" use="required"/>
		<xsd:attribute name="cohesion" type="pret:cohesionType" use="optional" default="normal">
			<xsd:annotation>
				<xsd:documentation xml:lang="en">Specifies the level of cohesion of its direct subelements ("weak", "normal", "strong").</xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
	</xsd:complexType>
	<xsd:complexType name="groupType">
		<xsd:choice minOccurs="0" maxOccurs="unbounded">
			<xsd:element name="group" type="pret:groupType">
				<xsd:annotation>
					<xsd:documentation xml:lang="en">Groups can be nested.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:group ref="pret:interactorGroup">
				<xsd:annotation>
					<xsd:documentation xml:lang="en">A group can contain any Interactor.</xsd:documentation>
				</xsd:annotation>
			</xsd:group>
		</xsd:choice>
		<xsd:attribute name="id" type="xsd:ID" use="required"/>
		<xsd:attribute name="navindex" type="xsd:nonNegativeInteger" use="optional">
			<xsd:annotation>
				<xsd:documentation xml:lang="en">Specific position in a navigation sequence.</xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
		<xsd:attribute name="cohesion" type="pret:cohesionType" use="optional" default="normal">
			<xsd:annotation>
				<xsd:documentation xml:lang="en">Specifies the level of cohesion of its direct subelements ("weak", "normal", "strong").</xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
	</xsd:complexType>
	<xsd:group name="interactorGroup">
		<xsd:choice>
			<xsd:element name="input" type="pret:inputType">
				<xsd:annotation>
					<xsd:documentation xml:lang="en">Interactor: Enables free-form data entry. Binding restrictions apply.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="secret" type="pret:secretType">
				<xsd:annotation>
					<xsd:documentation xml:lang="en">Interactor: For entering information that is considered sensitive and not echoed to the user as it is being entered, e.g. password entry. Binding restrictions apply.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="textarea" type="pret:textareaType">
				<xsd:annotation>
					<xsd:documentation xml:lang="en">Interactor:  Enables free-form data entry in a multiline format. Binding restrictions apply.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="select1" type="pret:select1Type">
				<xsd:annotation>
					<xsd:documentation xml:lang="en">Interactor: Allows the user to make a single selection from a set of choices. Binding restrictions apply.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="select" type="pret:selectType">
				<xsd:annotation>
					<xsd:documentation xml:lang="en">Interactor: Allows the user to make multiple selections from a set of choices. Binding restrictions apply.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="range" type="pret:rangeType">
				<xsd:annotation>
					<xsd:documentation xml:lang="en">Interactor: Allows selection from a sequential range of values. Binding restrictions apply.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="trigger" type="pret:triggerType">
				<xsd:annotation>
					<xsd:documentation xml:lang="en">Interactor: Triggers an action. Binds to a command.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="output" type="pret:outputType">
				<xsd:annotation>
					<xsd:documentation xml:lang="en">Interactor: Displays a value that cannot be edited by the user. Binding restrictions apply.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
		</xsd:choice>
	</xsd:group>
	<xsd:complexType name="interactorBaseType">
		<xsd:annotation>
			<xsd:documentation xml:lang="en">Base type for Interactors.</xsd:documentation>
		</xsd:annotation>
		<xsd:attribute name="id" type="xsd:ID" use="required"/>
		<xsd:attribute name="ref" type="xsd:anyURI" use="required">
			<xsd:annotation>
				<xsd:documentation xml:lang="en">Specifies socket element that the Interactor is bound to.</xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
		<xsd:attribute name="navindex" type="xsd:nonNegativeInteger" use="optional">
			<xsd:annotation>
				<xsd:documentation xml:lang="en">Specific position in a navigation sequence.</xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
	</xsd:complexType>
	<xsd:complexType name="inputType">
		<xsd:complexContent>
			<xsd:extension base="pret:interactorBaseType">
				<xsd:attribute name="incremental" type="xsd:boolean" use="optional" default="false">
					<xsd:annotation>
						<xsd:documentation xml:lang="en">Specifies whether any user-triggered change in the value of the Interactor shall be propagated immediately to the Socket element the Interactor is bound to.</xsd:documentation>
					</xsd:annotation>
				</xsd:attribute>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
	<xsd:complexType name="secretType">
		<xsd:complexContent>
			<xsd:extension base="pret:interactorBaseType">
				<xsd:attribute name="incremental" type="xsd:boolean" use="optional" default="false">
					<xsd:annotation>
						<xsd:documentation xml:lang="en">Specifies whether any user-triggered change in the value of the Interactor shall be propagated immediately to the Socket element the Interactor is bound to.</xsd:documentation>
					</xsd:annotation>
				</xsd:attribute>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
	<xsd:complexType name="textareaType">
		<xsd:complexContent>
			<xsd:extension base="pret:interactorBaseType">
				<xsd:attribute name="incremental" type="xsd:boolean" use="optional" default="false">
					<xsd:annotation>
						<xsd:documentation xml:lang="en">Specifies whether any user-triggered change in the value of the Interactor shall be propagated immediately to the Socket element the Interactor is bound to.</xsd:documentation>
					</xsd:annotation>
				</xsd:attribute>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
	<xsd:complexType name="select1Type">
		<xsd:complexContent>
			<xsd:extension base="pret:interactorBaseType">
				<xsd:attribute name="incremental" type="xsd:boolean" use="optional" default="true">
					<xsd:annotation>
						<xsd:documentation xml:lang="en">Specifies whether any user-triggered change in the value of the Interactor shall be propagated immediately to the Socket element the Interactor is bound to.</xsd:documentation>
					</xsd:annotation>
				</xsd:attribute>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
	<xsd:complexType name="selectType">
		<xsd:complexContent>
			<xsd:extension base="pret:interactorBaseType">
				<xsd:attribute name="incremental" type="xsd:boolean" use="optional" default="true">
					<xsd:annotation>
						<xsd:documentation xml:lang="en">Specifies whether any user-triggered change in the value of the Interactor shall be propagated immediately to the Socket element the Interactor is bound to.</xsd:documentation>
					</xsd:annotation>
				</xsd:attribute>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
	<xsd:complexType name="rangeType">
		<xsd:complexContent>
			<xsd:extension base="pret:interactorBaseType">
				<xsd:attribute name="incremental" type="xsd:boolean" use="optional" default="true">
					<xsd:annotation>
						<xsd:documentation xml:lang="en">Specifies whether any user-triggered change in the value of the Interactor shall be propagated immediately to the Socket element the Interactor is bound to.</xsd:documentation>
					</xsd:annotation>
				</xsd:attribute>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
	<xsd:complexType name="triggerType">
		<xsd:complexContent>
			<xsd:extension base="pret:interactorBaseType"/>
		</xsd:complexContent>
	</xsd:complexType>
	<xsd:complexType name="outputType">
		<xsd:complexContent>
			<xsd:extension base="pret:interactorBaseType"/>
		</xsd:complexContent>
	</xsd:complexType>
	<xsd:complexType name="modalDialogType">
		<xsd:complexContent>
			<xsd:extension base="pret:interactorBaseType">
				<xsd:choice minOccurs="0" maxOccurs="unbounded">
					<xsd:element name="group" type="pret:groupType"/>
					<xsd:group ref="pret:interactorGroup"/>
				</xsd:choice>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
	<!-- attribute types -->
	<xsd:simpleType name="cohesionType">
		<xsd:annotation>
			<xsd:documentation xml:lang="en">Cohesion levels.</xsd:documentation>
		</xsd:annotation>
		<xsd:restriction base="xsd:string">
			<xsd:enumeration value="strong"/>
			<xsd:enumeration value="normal"/>
			<xsd:enumeration value="weak"/>
		</xsd:restriction>
	</xsd:simpleType>
</xsd:schema>

