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

	Abstract: This is the XML Schema Definition for the Target Description language, 
as specified by ISO/IEC 24752 part 4.  In case of any differences between this specification and 
ISO/IEC 24752-4, the normative ISO/IEC standard shall take precedence.  In fact, this XSD file doesn't exactly 
reflect the syntax as specified in ISO/IEC 24752-4 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 Target Description: “application/urc-targetdesc+xml”.

	Note regarding ISO/IEC 24752-4, section 6.12, Extensions for Security and Privacy: Such extensions are
not included in this XSD, to enforce stricter syntax checking.  If 3rd parties define such extensions, they
need to augment this XSD with their extensions.

	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:td="http://myurc.org/ns/targetdesc" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 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/targetdesc" elementFormDefault="qualified" attributeFormDefault="unqualified" version="ISO/IEC FDIS 24752-4:2007" xsi:schemaLocation="http://www.w3.org/2001/XMLSchema http://www.w3.org/2001/XMLSchema.xsd">
	<xsd:annotation>
		<xsd:documentation>
			<dc:title xml:lang="en-US">XML Schema for Target Description 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-4:2007</dc:description>
			<dc:language xml:lang="en-US">English</dc:language>
			<dcterms:issued>2004-01-28</dcterms:issued>
			<dcterms:modified>2007-08-20</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="target" type="td:targetType">
		<xsd:annotation>
			<xsd:documentation xml:lang="en">Root element of Target Description.</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<!-- element types	-->
	<xsd:complexType name="targetType">
		<xsd:sequence>
			<xsd:annotation>
				<xsd:documentation xml:lang="en">Specific order of children is required due to XSD syntax limitations. This is more restrictive than ISO/IEC 24752-4.</xsd:documentation>
			</xsd:annotation>
			<xsd:any namespace="http://purl.org/dc/elements/1.1/ http://purl.org/dc/terms/" minOccurs="0" maxOccurs="unbounded">
				<xsd:annotation>
					<xsd:documentation xml:lang="en">Due to XSD syntax limitations, this is not as restrictive as ISO/IEC 24752-4: dcterms:conformsTo is required as a minimum.</xsd:documentation>
				</xsd:annotation>
			</xsd:any>
			<xsd:element name="mapping" type="td:mappingType" minOccurs="0" maxOccurs="unbounded">
				<xsd:annotation>
					<xsd:documentation xml:lang="en">Platform-specific binding information for the Target.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="locator" type="td:locatorType" minOccurs="0" maxOccurs="unbounded"/>
			<xsd:element name="socket" type="td:socketType" maxOccurs="unbounded"/>
			<xsd:any namespace="http://www.w3.org/1999/02/22-rdf-syntax-ns#" processContents="lax">
				<xsd:annotation>
					<xsd:documentation xml:lang="en">Resource Directory of the Target.  Strictly, this element must be the RDF element of the given namespace, but there is no RDF element definition that could be referenced.  The RDF element inserted here must include a ResourceDirectory element of namespace "http://myurc.org/res#", as specified in ISO/IEC 24752-5.</xsd:documentation>
				</xsd:annotation>
			</xsd:any>
		</xsd:sequence>
		<xsd:attribute name="about" type="xsd:anyURI" use="required">
			<xsd:annotation>
				<xsd:documentation xml:lang="en">References the Target that is being described. The URI may not be resolvable, but it must be globally unique.</xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
		<xsd:attribute name="id" type="xsd:ID" use="required"/>
		<xsd:attribute name="hidden" type="xsd:boolean" default="false">
			<xsd:annotation>
				<xsd:documentation xml:lang="en">Hint to the URC whether this Target should not be shown to the user.  The hidden attribute can be specified on Target and Socket level. The Socket inherits the setting from the Target.  If specified on both levels, the Socket's hidden attribute overrides the one of the Target.</xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
	</xsd:complexType>
	<xsd:complexType name="locatorType">
		<xsd:annotation>
			<xsd:documentation xml:lang="en">
			</xsd:documentation>
		</xsd:annotation>
		<xsd:choice minOccurs="0" maxOccurs="unbounded">
			<xsd:element name="mapping" type="td:mappingType">
				<xsd:annotation>
					<xsd:documentation xml:lang="en">Platform-specific binding information for the locator.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="extension" type="td:extensionType">
				<xsd:annotation>
					<xsd:documentation xml:lang="en">Container for vendor-specific extension elements from other namespaces.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
		</xsd:choice>
		<xsd:attribute name="type" type="td:locatorTypeType" use="required">
			<xsd:annotation>
				<xsd:documentation xml:lang="en">Allowed values are "audio", "visual" and "other".</xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
		<xsd:attribute name="id" type="xsd:ID" use="required"/>
	</xsd:complexType>
	<xsd:complexType name="mappingType" mixed="true">
		<xsd:choice minOccurs="0" maxOccurs="unbounded">
			<xsd:any namespace="##other"/>
		</xsd:choice>
		<xsd:attribute name="platform" type="xsd:string" use="required">
			<xsd:annotation>
				<xsd:documentation xml:lang="en">Identifier for a particular networking platform.</xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
	</xsd:complexType>
	<xsd:complexType name="extensionType">
		<xsd:sequence minOccurs="0" maxOccurs="unbounded">
			<xsd:any namespace="##other" processContents="lax"/>
		</xsd:sequence>
	</xsd:complexType>
	<xsd:complexType name="socketType">
		<xsd:sequence>
			<xsd:annotation>
				<xsd:documentation xml:lang="en">Specific order of children is required due to XSD syntax limitations. This is more restrictive than ISO/IEC 24752-4.</xsd:documentation>
			</xsd:annotation>
			<xsd:element name="socketDescriptionLocalAt" type="xsd:anyURI">
				<xsd:annotation>
					<xsd:documentation xml:lang="en">Specifies a URI (as element content) that can be used to retrieve the Socket Description document for the Socket.		</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="category" type="td:categoryType" minOccurs="0" maxOccurs="unbounded">
				<xsd:annotation>
					<xsd:documentation xml:lang="en">Specifies a Target category. The category element can be repeated with different values.  This is useful if the classification schema allows for multiple values, or if multiple classification schemas are employed.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="constraints" type="td:constraintsType" minOccurs="0" maxOccurs="unbounded"/>
			<xsd:any namespace="http://purl.org/dc/elements/1.1/ http://purl.org/dc/terms/" minOccurs="0" maxOccurs="unbounded"/>
			<xsd:element name="mapping" type="td:mappingType" minOccurs="0" maxOccurs="unbounded">
				<xsd:annotation>
					<xsd:documentation xml:lang="en">Platform-specific binding information for the Socket.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
		</xsd:sequence>
		<xsd:attribute name="id" type="xsd:ID" use="required"/>
		<xsd:attribute name="name" type="td:socketNameType" use="required">
			<xsd:annotation>
				<xsd:documentation xml:lang="en">URI that identifies the Socket globally, not containing a fragment identifier.</xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
		<xsd:attribute name="type" type="td:socketTypeType" use="optional" default="location-dependent">
			<xsd:annotation>
				<xsd:documentation xml:lang="en">Allowed values are "location-dependent" (default), "location-informative", and "location-free".  </xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
		<xsd:attribute name="hidden" type="xsd:boolean" use="optional" default="false">
			<xsd:annotation>
				<xsd:documentation xml:lang="en">Hint to the URC whether this Socket should not be shown to the user.  The hidden attribute can be specified on Target and Socket level. The Socket inherits the setting from the Target.  If specified on both levels, the Socket's hidden attribute overrides the one of the Target.	</xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
		<xsd:attribute name="maxSessions" type="xsd:positiveInteger" use="optional">
			<xsd:annotation>
				<xsd:documentation xml:lang="en">Provides a hint to the URC as to how many sessions the Target Socket can maintain simultaneously.</xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
		<xsd:attribute name="sharedSessions" type="xsd:boolean" use="optional">
			<xsd:annotation>
				<xsd:documentation xml:lang="en">Provides a hint to the URC as to whether multiple sessions with the same Target Socket will be shared or not.	</xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
		<xsd:attribute name="requestable" type="xsd:boolean" use="optional" default="true">
			<xsd:annotation>
				<xsd:documentation xml:lang="en">Provides a hint to the URC as to whether it can request to open a session with the Target Socket directly, or only after a Session Forward request initiated by the Target.</xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
	</xsd:complexType>
	<xsd:complexType name="categoryType">
		<xsd:annotation>
			<xsd:documentation xml:lang="en">Category for a target.
			</xsd:documentation>
		</xsd:annotation>
		<xsd:simpleContent>
			<xsd:extension base="xsd:string">
				<xsd:attribute name="taxonomyName" type="xsd:anyURI">
					<xsd:annotation>
						<xsd:documentation xml:lang="en">Classification schema, recommended. </xsd:documentation>
					</xsd:annotation>
				</xsd:attribute>
			</xsd:extension>
		</xsd:simpleContent>
	</xsd:complexType>
	<xsd:complexType name="constraintsType">
		<xsd:annotation>
			<xsd:documentation xml:lang="en">Constraints on the use of a socket.
			</xsd:documentation>
		</xsd:annotation>
		<xsd:choice minOccurs="0" maxOccurs="unbounded">
			<xsd:any namespace="##any" processContents="lax"/>
		</xsd:choice>
	</xsd:complexType>
	<!-- attribute types -->
	<xsd:simpleType name="locatorTypeType">
		<xsd:annotation>
			<xsd:documentation xml:lang="en">Type of the 'type' attribute for locators.
			</xsd:documentation>
		</xsd:annotation>
		<xsd:restriction base="xsd:string">
			<xsd:enumeration value="audio"/>
			<xsd:enumeration value="visual"/>
			<xsd:enumeration value="other"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="socketNameType">
		<xsd:annotation>
			<xsd:documentation xml:lang="en">Type of a name attribute for socket element. Restriction on the URI format. 
			</xsd:documentation>
		</xsd:annotation>
		<xsd:restriction base="xsd:anyURI">
			<xsd:pattern value="[^#]*"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="socketTypeType">
		<xsd:annotation>
			<xsd:documentation xml:lang="en">Type of the 'type' attribute for socket.
			</xsd:documentation>
		</xsd:annotation>
		<xsd:restriction base="xsd:string">
			<xsd:enumeration value="location-dependent"/>
			<xsd:enumeration value="location-informative"/>
			<xsd:enumeration value="location-free"/>
		</xsd:restriction>
	</xsd:simpleType>
</xsd:schema>
