<?xml version="1.0" encoding="UTF-8"?>
<!-- 
	OMA DRM 2.0 Extensions for BCAST (XBS) - ROAP
		version 	- 2.0
		date    	- 07 Aug 2008

    FILE INFORMATION

	OMA Permanent Document
	   File: OMA-SUP-XSD_drm_roap_xbs-V2_0-20080807-C
	   Type: Text - Schema Description

	Public Reachable Information
	   Path: http://www.openmobilealliance.org/tech/profiles
	   Name: drm_roap_xbs-v2_0.xsd

    NORMATIVE INFORMATION

	Information about this file can be found in the specification
	    OMA-TS-DRM_XBS-V1_0
	available at http://www.openmobilealliance.org/

	Send comments to technical-comments@mail.openmobilealliance.org

    LEGAL DISCLAIMER

	Use of this document is subject to all of the terms and conditions
	of the Use Agreement located at
		http://www.openmobilealliance.org/UseAgreement.html

	You may use this document or any part of the document for internal
	or educational purposes only, provided you do not modify, edit or
	take out of context the information in this document in any manner.
	Information contained in this document may be used, at your sole
	risk, for any purposes.

	You may not use this document in any other manner without the prior
	written permission of the Open Mobile Alliance.  The Open Mobile
	Alliance authorizes you to copy this document, provided that you
	retain all copyright and other proprietary notices contained in the
	original materials on any copies of the materials and that you
	comply strictly with these terms.  This copyright permission does
	not constitute an endorsement of the products or services.  The
	Open Mobile Alliance assumes no responsibility for errors or
	omissions in this document.

	Each Open Mobile Alliance member has agreed to use reasonable
	endeavors to inform the Open Mobile Alliance in a timely manner of
	Essential IPR as it becomes aware that the Essential IPR is related
	to the prepared or published specification.  However, the members
	do not have an obligation to conduct IPR searches.  The declared
	Essential IPR is publicly available to members and non-members of
	the Open Mobile Alliance and may be found on the "OMA IPR
	Declarations" list at http://www.openmobilealliance.org/ipr.html.
	The Open Mobile Alliance has not conducted an independent IPR review
	of this document and the information contained herein, and makes no
	representations or warranties regarding third party IPR, including
	without limitation patents, copyrights or trade secret rights.  This
	document may contain inventions for which you must obtain licenses
	from third parties before making, using or selling the inventions.
	Defined terms above are set forth in the schedule to the Open Mobile
	Alliance Application Form.

	NO REPRESENTATIONS OR WARRANTIES (WHETHER EXPRESS OR IMPLIED) ARE
	MADE BY THE OPEN MOBILE ALLIANCE OR ANY OPEN MOBILE ALLIANCE MEMBER
	OR ITS AFFILIATES REGARDING ANY OF THE IPR'S REPRESENTED ON THE "OMA
	IPR DECLARATIONS" LIST, INCLUDING, BUT NOT LIMITED TO THE ACCURACY,
	COMPLETENESS, VALIDITY OR RELEVANCE OF THE INFORMATION OR WHETHER OR
	NOT SUCH RIGHTS ARE ESSENTIAL OR NON-ESSENTIAL.

	THE OPEN MOBILE ALLIANCE IS NOT LIABLE FOR AND HEREBY DISCLAIMS ANY
	DIRECT, INDIRECT, PUNITIVE, SPECIAL, INCIDENTAL, CONSEQUENTIAL, OR
	EXEMPLARY DAMAGES ARISING OUT OF OR IN CONNECTION WITH THE USE OF
	DOCUMENTS AND THE INFORMATION CONTAINED IN THE DOCUMENTS.

	Copyright 2008 Open Mobile Alliance Ltd.  All Rights Reserved.
	Used with the permission of the Open Mobile Alliance Ltd. under the
	terms set forth above.
-->
<!-- 
	CHANGE HISTORY
	
	20061110 	Schema created (OMA-BCAST-2006-0975-CR_ROAP_XML_schema_for_XBS)
	20070202	Editorial: Corrected reference to OMA-DD-XBS_V2_0.xsd and changed it from http to local
	20070305	CR OMA-BCAST-2007-0331-CR_XML_schema_change_signalling_of_subscriber_group_parameters implemented
	20070307	Clerical changes: corrected the reference to DD schema via http, comments moved
	20070325	Extensibility based on DRM 2.1 hooks implemented (see OMA-BCAST-2007-0445-CR_ROAP_Extensibility_XBS )
	20070417	R02 of CR OMA-BCAST-2007-0445-CR_ROAP_Extensibility_XBS implemented
	20070425	Clerical: made naming consistent with OMNA rules
	20080722	Aligned with OMA-TS-DRM_XBS-V1_0-20080722-D
	20080807	Clerical: renamed to Candidate version.
-->
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:roap="urn:oma:bac:dldrm:roap-1.0" xmlns:o-ex="http://odrl.net/1.1/ODRL-EX" xmlns:o-dd="http://odrl.net/1.1/ODRL-DD" xmlns:oma-dd="http://www.openmobilealliance.com/oma-dd" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:xenc="http://www.w3.org/2001/04/xmlenc#" targetNamespace="urn:oma:bac:dldrm:roap-1.0" elementFormDefault="unqualified" attributeFormDefault="unqualified">
	<!-- Would import the OMA profile of ODRL if such a schema existed -->
	<import namespace="http://odrl.net/1.1/ODRL-EX" schemaLocation="http://odrl.net/1.1/ODRL-EX-11.xsd"/>
	<import namespace="http://odrl.net/1.1/ODRL-DD" schemaLocation="http://odrl.net/1.1/ODRL-DD-11.xsd"/>
	<import namespace="http://www.openmobilealliance.com/oma-dd" schemaLocation="http://www.openmobilealliance.com/tech/profiles/drm_dd_xbs-v2_0.xsd"/>
	<import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="http://www.w3.org/TR/2002/REC-xmldsig-core-20020212/xmldsig-core-schema.xsd"/>
	<import namespace="http://www.w3.org/2001/04/xmlenc#" schemaLocation="http://www.w3.org/TR/xmlenc-core/xenc-schema.xsd"/>
	<!-- Basic Types -->
	<complexType name="Request" abstract="true">
		<attribute name="triggerNonce" type="roap:Nonce"/>
	</complexType>
	<complexType name="Response">
		<attribute name="status" type="string" use="required"/>
		<attribute name="errorMessage" type="string"/>
		<attribute name="errorRedirectURL" type="anyURI"/>
	</complexType>
	<!-- ROAP-ErrorResponse -->
	<!-- Message sent from RI to Device in response to an unknown message.-->
	<element name="errorResponse" type="roap:Response"/>
	<simpleType name="Version">
		<restriction base="string">
			<pattern value="\d{1,2}\.\d{1,3}"/>
		</restriction>
	</simpleType>
	<simpleType name="Status">
		<restriction base="string">
			<enumeration value="Success"/>
			<enumeration value="Abort"/>
			<enumeration value="NotSupported"/>
			<enumeration value="AccessDenied"/>
			<enumeration value="NotFound"/>
			<enumeration value="MalformedRequest"/>
			<enumeration value="UnknownCriticalExtension"/>
			<enumeration value="UnsupportedVersion"/>
			<enumeration value="UnsupportedAlgorithm"/>
			<enumeration value="NoCertificateChain"/>
			<enumeration value="InvalidCertificateChain"/>
			<enumeration value="TrustedRootCertificateNotPresent"/>
			<enumeration value="SignatureError"/>
			<enumeration value="DeviceTimeError"/>
			<enumeration value="NotRegistered"/>
			<enumeration value="InvalidDCFHash"/>
			<enumeration value="InvalidDomain"/>
			<enumeration value="DomainFull"/>
			<enumeration value="DomainAccessDenied"/>
			<enumeration value="RightsExpired"/>
			<!-- XBS extensions : usage metering -->
			<enumeration value="TokenConsumptionReportError"/>
			<enumeration value="NoTokenConsumptionReport"/>
		</restriction>
	</simpleType>
	<complexType name="Extensions">
		<sequence maxOccurs="unbounded">
			<element name="extension" type="roap:Extension"/>
		</sequence>
	</complexType>
	<complexType name="Extension" abstract="true">
		<attribute name="critical" type="boolean"/>
	</complexType>
	<!-- Extension container -->
	<complexType name="ExtensionContainer">
		<complexContent>
			<extension base="roap:Extension">
				<sequence>
					<any namespace="##any" processContents="lax" maxOccurs="unbounded"/>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<!-- ROAP extensions -->
	<!-- No need for OCSPResponses to be sent -->
	<!-- Mainly for use in the 2-pass RO Request protocol -->
	<complexType name="NoOCSPResponse">
		<complexContent>
			<extension base="roap:Extension"/>
		</complexContent>
	</complexType>
	<!-- No need for receiving party's certificate chain to be sent -->
	<!-- Mainly for use in the 2-pass RO Request protocol -->
	<complexType name="PeerKeyIdentifier">
		<complexContent>
			<extension base="roap:Extension">
				<sequence minOccurs="0">
					<element name="identifier" type="roap:KeyIdentifier"/>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<!-- No need for inclusion of OCSP responder certificates -->
	<!-- Mainly for use in the 2-pass RO Request protocol -->
	<complexType name="OCSPResponderKeyIdentifier">
		<complexContent>
			<extension base="roap:Extension">
				<sequence>
					<element name="identifier" type="roap:KeyIdentifier"/>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<!-- Device Details -->
	<!-- Used in ROAP-RIHello and ROAP-RegistrationRequest messages -->
	<complexType name="DeviceDetails">
		<complexContent>
			<extension base="roap:Extension">
				<sequence minOccurs="0">
					<element name="manufacturer" type="string"/>
					<element name="model" type="string"/>
					<element name="version" type="string"/>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<!-- Loyalty program information -->
	<!-- Mainly for use in two-pass RO Request protocol-->
	<complexType name="TransactionIdentifier">
		<complexContent>
			<extension base="roap:Extension">
				<sequence maxOccurs="unbounded">
					<element name="contentID" type="anyURI"/>
					<element name="id">
						<simpleType>
							<restriction base="string">
								<length value="16"/>
							</restriction>
						</simpleType>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<!-- Certificate chain caching capabilities extension -->
	<!-- (Device signals support of the extension, RI signals if it will -->
	<!-- store the device's certificates) -->
	<complexType name="CertificateCaching">
		<complexContent>
			<extension base="roap:Extension"/>
		</complexContent>
	</complexType>
	<!-- Support for hash chains in Domains -->
	<complexType name="HashChainSupport">
		<complexContent>
			<extension base="roap:Extension"/>
		</complexContent>
	</complexType>
	<!-- Device does not consider itself a member of the domain it is -->
	<!-- leaving -->
	<complexType name="NotDomainMember">
		<complexContent>
			<extension base="roap:Extension"/>
		</complexContent>
	</complexType>
	<!-- Domain Name Whitelist Extension for ROAP-RegistrationResponse -->
	<!-- RI can specify up to 5 domain names for silent/preview rights security -->
	<complexType name="DomainNameWhiteList">
		<complexContent>
			<extension base="roap:Extension">
				<sequence maxOccurs="5">
					<element name="dn" type="string"/>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<!-- Basic types to identify entities -->
	<complexType name="Identifier">
		<choice>
			<element name="keyIdentifier" type="roap:KeyIdentifier"/>
			<any namespace="##other" processContents="strict"/>
		</choice>
	</complexType>
	<complexType name="KeyIdentifiers">
		<sequence minOccurs="0" maxOccurs="unbounded">
			<element name="keyIdentifier" type="roap:KeyIdentifier"/>
		</sequence>
	</complexType>
	<complexType name="KeyIdentifier" abstract="true"/>
	<!-- Hash of complete DER-encoded subjectPublicKeyInfo from -->
	<!-- key holder's certificate -->
	<complexType name="X509SPKIHash">
		<complexContent>
			<extension base="roap:KeyIdentifier">
				<sequence>
					<element name="hash" type="base64Binary"/>
				</sequence>
				<attribute name="algorithm" type="anyURI" default="http://www.w3.org/2000/09/xmldsig#sha1"/>
			</extension>
		</complexContent>
	</complexType>
	<!-- The corresponding ds:KeyInfo type -->
	<element name="X509SPKIHash" type="roap:X509SPKIHash"/>
	<!-- Domain Identifier -->
	<!-- Last three characters (decimal digits) shall be interpreted as -->
	<!-- domain generation -->
	<simpleType name="DomainIdentifier">
		<restriction base="string">
			<pattern value=".{1,17}\d{3}"/>
		</restriction>
	</simpleType>
	<!-- The corresponding ds:KeyInfo type -->
	<element name="domainID" type="roap:DomainIdentifier"/>
	<!-- Rights Object Definitions -->
	<complexType name="ROPayload">
		<sequence>
			<element name="riID" type="roap:Identifier"/>
			<element name="rights" type="o-ex:rightsType"/>
			<element name="signature" type="ds:SignatureType" minOccurs="0"/>
			<element name="timeStamp" type="dateTime" minOccurs="0"/>
			<element name="encKey" type="xenc:EncryptedKeyType"/>
			<any processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
		</sequence>
		<attribute name="version" type="roap:Version" use="required"/>
		<attribute name="id" type="ID" use="required"/>
		<attribute name="stateful" type="boolean"/>
		<attribute name="domainRO" type="boolean"/>
		<attribute name="riURL" type="anyURI"/>
	</complexType>
	<!-- May be sent standalone (domain ROs) -->
	<element name="protectedRO" type="roap:ProtectedRO"/>
	<complexType name="ProtectedRO">
		<sequence>
			<element name="ro" type="roap:ROPayload" form="qualified"/>
			<element name="mac" type="ds:SignatureType"/>
		</sequence>
	</complexType>
	<!-- Registration protocol -->
	<!-- ROAP-DeviceHello -->
	<element name="deviceHello" type="roap:DeviceHello"/>
	<complexType name="DeviceHello">
		<annotation>
			<documentation xml:lang="en">
        Message sent from Device to RI to establish an RI context.
        association.
      </documentation>
		</annotation>
		<complexContent>
			<extension base="roap:Request">
				<sequence>
					<element name="version" type="roap:Version"/>
					<element name="deviceID" type="roap:Identifier" maxOccurs="unbounded"/>
					<element name="supportedAlgorithm" type="anyURI" minOccurs="0" maxOccurs="unbounded"/>
					<element name="extensions" type="roap:Extensions" minOccurs="0"/>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<!-- ROAP-RIHello -->
	<element name="riHello" type="roap:RIHello"/>
	<complexType name="RIHello">
		<annotation>
			<documentation xml:lang="en">
        Message sent from RI to Device in response to a deviceHello message.
      </documentation>
		</annotation>
		<complexContent>
			<extension base="roap:Response">
				<sequence minOccurs="0">
					<element name="selectedVersion" type="roap:Version"/>
					<element name="riID" type="roap:Identifier"/>
					<element name="selectedAlgorithm" type="anyURI" minOccurs="0" maxOccurs="unbounded"/>
					<element name="riNonce" type="roap:Nonce"/>
					<element name="trustedAuthorities" type="roap:KeyIdentifiers" minOccurs="0"/>
					<element name="serverInfo" type="base64Binary" minOccurs="0"/>
					<element name="extensions" type="roap:Extensions" minOccurs="0"/>
				</sequence>
				<attribute name="sessionId" type="string"/>
			</extension>
		</complexContent>
	</complexType>
	<simpleType name="Nonce">
		<restriction base="base64Binary">
			<minLength value="14"/>
		</restriction>
	</simpleType>
	<!-- ROAP-RegistrationRequest -->
	<element name="registrationRequest" type="roap:RegistrationRequest"/>
	<complexType name="RegistrationRequest">
		<annotation>
			<documentation xml:lang="en">
        Message sent from Device to RI to request registration.
      </documentation>
		</annotation>
		<complexContent>
			<extension base="roap:Request">
				<sequence>
					<element name="nonce" type="roap:Nonce"/>
					<element name="time" type="roap:dateTimeOrUndefined"/>
					<element name="certificateChain" type="roap:CertificateChain" minOccurs="0"/>
					<element name="trustedAuthorities" type="roap:KeyIdentifiers" minOccurs="0"/>
					<element name="serverInfo" type="base64Binary" minOccurs="0"/>
					<element name="extensions" type="roap:Extensions" minOccurs="0"/>
					<element name="signature" type="base64Binary"/>
				</sequence>
				<attribute name="sessionId" type="string" use="required"/>
			</extension>
		</complexContent>
	</complexType>
	<simpleType name="dateTimeOrUndefined">
		<union memberTypes="dateTime roap:UndefinedString"/>
	</simpleType>
	<simpleType name="UndefinedString">
		<restriction base="string">
			<enumeration value="Undefined"/>
		</restriction>
	</simpleType>
	<complexType name="CertificateChain">
		<sequence maxOccurs="unbounded">
			<element name="certificate" type="base64Binary"/>
		</sequence>
	</complexType>
	<!-- ROAP-RegistrationResponse -->
	<element name="registrationResponse" type="roap:RegistrationResponse"/>
	<complexType name="RegistrationResponse">
		<annotation>
			<documentation xml:lang="en">
        Message sent from RI to Device in response to a registrationRequest message.
      </documentation>
		</annotation>
		<complexContent>
			<extension base="roap:Response">
				<sequence minOccurs="0">
					<element name="riURL" type="anyURI"/>
					<element name="certificateChain" type="roap:CertificateChain" minOccurs="0"/>
					<element name="ocspResponse" type="base64Binary" minOccurs="0" maxOccurs="unbounded"/>
					<element name="extensions" type="roap:Extensions" minOccurs="0"/>
					<element name="signature" type="base64Binary"/>
				</sequence>
				<attribute name="sessionId" type="string"/>
			</extension>
		</complexContent>
	</complexType>
	<!-- RO acquisition protocol -->
	<!-- ROAP-RORequest -->
	<element name="roRequest" type="roap:RORequest"/>
	<complexType name="RORequest">
		<annotation>
			<documentation xml:lang="en">
        Message sent from Device to RI to request an RO.
      </documentation>
		</annotation>
		<complexContent>
			<extension base="roap:Request">
				<sequence>
					<element name="deviceID" type="roap:Identifier"/>
					<element name="domainID" type="roap:DomainIdentifier" minOccurs="0"/>
					<element name="riID" type="roap:Identifier"/>
					<element name="nonce" type="roap:Nonce"/>
					<element name="time" type="dateTime"/>
					<element name="roInfo">
						<complexType>
							<sequence maxOccurs="unbounded">
								<element name="roID" type="ID"/>
								<element name="dcfHash" minOccurs="0">
									<complexType>
										<sequence>
											<element name="hash" type="base64Binary"/>
										</sequence>
										<attribute name="algorithm" type="anyURI" default="http://www.w3.org/2000/09/xmldsig#sha1"/>
									</complexType>
								</element>
							</sequence>
						</complexType>
					</element>
					<element name="certificateChain" type="roap:CertificateChain" minOccurs="0"/>
					<element name="extensions" type="roap:Extensions" minOccurs="0"/>
					<element name="signature" type="base64Binary"/>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<!-- ROAP-ROResponse -->
	<element name="roResponse" type="roap:ROResponse"/>
	<complexType name="ROResponse">
		<annotation>
			<documentation xml:lang="en">
        Message sent from RI to Device in response to a roRequest message.
      </documentation>
		</annotation>
		<complexContent>
			<extension base="roap:Response">
				<sequence minOccurs="0">
					<element name="deviceID" type="roap:Identifier"/>
					<element name="riID" type="roap:Identifier"/>
					<element name="nonce" type="roap:Nonce" minOccurs="0"/>
					<element name="protectedRO" type="roap:ProtectedRO" form="qualified" maxOccurs="unbounded"/>
					<element name="certificateChain" type="roap:CertificateChain" minOccurs="0"/>
					<element name="ocspResponse" type="base64Binary" minOccurs="0" maxOccurs="unbounded"/>
					<element name="extensions" type="roap:Extensions" minOccurs="0"/>
					<element name="signature" type="base64Binary"/>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<!-- Domain registration protocol -->
	<!-- ROAP-JoinDomainRequest -->
	<element name="joinDomainRequest" type="roap:DomainRequest"/>
	<complexType name="DomainRequest">
		<annotation>
			<documentation xml:lang="en">
        General PDU for sending domain-related requests from a Device to
        an RI.
      </documentation>
		</annotation>
		<complexContent>
			<extension base="roap:Request">
				<sequence>
					<element name="deviceID" type="roap:Identifier"/>
					<element name="riID" type="roap:Identifier"/>
					<element name="nonce" type="roap:Nonce"/>
					<element name="time" type="roap:dateTimeOrUndefined"/>
					<element name="domainID" type="roap:DomainIdentifier"/>
					<element name="certificateChain" type="roap:CertificateChain" minOccurs="0"/>
					<element name="extensions" type="roap:Extensions" minOccurs="0"/>
					<element name="signature" type="base64Binary"/>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<!-- ROAP-JoinDomainResponse -->
	<element name="joinDomainResponse" type="roap:JoinDomainResponse"/>
	<complexType name="JoinDomainResponse">
		<annotation>
			<documentation xml:lang="en">
        Message sent from RI to Device in response to a joinDomainRequest message.
      </documentation>
		</annotation>
		<complexContent>
			<extension base="roap:Response">
				<sequence minOccurs="0">
					<element name="deviceID" type="roap:Identifier"/>
					<element name="riID" type="roap:Identifier"/>
					<element name="nonce" type="roap:Nonce"/>
					<element name="domainInfo" type="roap:DomainInfo"/>
					<element name="certificateChain" type="roap:CertificateChain" minOccurs="0"/>
					<element name="ocspResponse" type="base64Binary" minOccurs="0" maxOccurs="unbounded"/>
					<element name="extensions" type="roap:Extensions" minOccurs="0"/>
					<element name="signature" type="base64Binary"/>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="DomainInfo">
		<sequence>
			<element name="notAfter" type="roap:dateTimeOrInfinite"/>
			<element name="domainKey" type="roap:ProtectedDomainKey" form="qualified" maxOccurs="unbounded"/>
		</sequence>
	</complexType>
	<simpleType name="dateTimeOrInfinite">
		<union memberTypes="dateTime roap:InfiniteString"/>
	</simpleType>
	<simpleType name="InfiniteString">
		<restriction base="string">
			<enumeration value="Infinite"/>
		</restriction>
	</simpleType>
	<complexType name="ProtectedDomainKey">
		<sequence>
			<element name="encKey" type="xenc:EncryptedKeyType"/>
			<element name="riID" type="roap:Identifier"/>
			<element name="mac" type="base64Binary"/>
		</sequence>
	</complexType>
	<!-- ROAP-LeaveDomainRequest -->
	<element name="leaveDomainRequest" type="roap:DomainRequest"/>
	<!-- ROAP-LeaveDomainResponse -->
	<element name="leaveDomainResponse" type="roap:LeaveDomainResponse"/>
	<complexType name="LeaveDomainResponse">
		<annotation>
			<documentation xml:lang="en">
        Message sent from RI to Device in response to a leaveDomainRequest message.
      </documentation>
		</annotation>
		<complexContent>
			<extension base="roap:Response">
				<sequence minOccurs="0">
					<element name="nonce" type="roap:Nonce"/>
					<element name="domainID" type="roap:DomainIdentifier"/>
					<element name="extensions" type="roap:Extensions" minOccurs="0"/>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<!-- ROAP-Trigger, reformulated in line with DRM 2.1 -->
	<complexType name="BasicRoapTrigger">
		<sequence>
			<element name="riID" type="roap:Identifier"/>
			<element name="riAlias" type="string" minOccurs="0"/>
			<element name="nonce" type="roap:Nonce" minOccurs="0"/>
			<element name="roapURL" type="anyURI"/>
		</sequence>
		<attribute name="id" type="ID"/>
	</complexType>
	<complexType name="DomainTrigger">
		<complexContent>
			<extension base="roap:BasicRoapTrigger">
				<sequence>
					<element name="domainID" type="roap:DomainIdentifier" minOccurs="0"/>
					<element name="domainAlias" type="string" minOccurs="0"/>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="ROAcquisitionTrigger">
		<complexContent>
			<extension base="roap:DomainTrigger">
				<sequence>
					<sequence maxOccurs="unbounded">
						<element name="roID" type="ID"/>
						<element name="roAlias" type="string" minOccurs="0"/>
						<element name="contentID" type="anyURI" minOccurs="0" maxOccurs="unbounded"/>
					</sequence>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<!-- Extended ROAP trigger, in line with DRM 2.1 extensibility -->
	<complexType name="ExtendedRoapTrigger">
		<complexContent>
			<extension base="roap:BasicRoapTrigger">
				<sequence>
					<any minOccurs="0" maxOccurs="unbounded" processContents="lax"/>
				</sequence>
				<attribute name="type" type="string" use="required"/>
			</extension>
		</complexContent>
	</complexType>
	<!-- Broadcast Registration ROAP trigger -->
	<complexType name="BroadcastRegistrationTrigger">
		<complexContent>
			<extension base="roap:BasicRoapTrigger">
				<attribute name="type" type="string" use="required" fixed="broadcastRegistration"/>
			</extension>
		</complexContent>
	</complexType>
	<!-- ROAP trigger -->
	<element name="roapTrigger" type="roap:RoapTrigger"/>
	<complexType name="RoapTrigger">
		<annotation>
			<documentation xml:lang="en">
        Message used to trigger the device to initiate a Rights Object Acquisition Protocol.
      </documentation>
		</annotation>
		<sequence>
			<choice>
				<element name="registrationRequest" type="roap:BasicRoapTrigger"/>
				<element name="roAcquisition" type="roap:ROAcquisitionTrigger"/>
				<element name="joinDomain" type="roap:DomainTrigger"/>
				<element name="leaveDomain" type="roap:DomainTrigger"/>
				<!-- hook for extensions -->
				<element name="extendedTrigger" type="roap:ExtendedRoapTrigger"/>
			</choice>
			<element name="signature" type="ds:SignatureType" minOccurs="0"/>
			<element name="encKey" type="xenc:EncryptedKeyType" minOccurs="0"/>
		</sequence>
		<attribute name="version" type="roap:Version"/>
		<attribute name="proxy" type="boolean"/>
	</complexType>
	<!-- XBS extensions : online registration -->
	<complexType name="BroadcastRegistrationRequest">
		<complexContent>
			<extension base="roap:Extension"/>
		</complexContent>
	</complexType>
	<!-- this element shall be marked as critical and sent in an ExtensionContainer -->
	<element name="broadcastRegistrationRequest" type="roap:BroadcastRegistrationRequest"/>
	<complexType name="SubscriberGroupKey">
		<complexContent>
			<extension base="ds:KeyInfoType">
				<attribute name="node" type="hexBinary"/>
			</extension>
		</complexContent>
	</complexType>
	<simpleType name="ShortUniqueDeviceNumber">
		<restriction base="string">
			<pattern value="\d{8}"/>
		</restriction>
	</simpleType>
	<complexType name="SubscriberGroupRegistration">
		<sequence>
			<element name="subscriberGroupAddress" type="roap:SubscriberGroupIdentifier"/>
			<element name="uniqueGroupKey" type="roap:UniqueGroupKey"/>
			<element name="uniqueDeviceKey" type="roap:UniqueDeviceKey" minOccurs="0"/>
			<element name="subscriberGroupKey" type="roap:SubscriberGroupKey" minOccurs="0" maxOccurs="unbounded"/>
			<element name="shortUniqueDeviceNumber" type="roap:ShortUniqueDeviceNumber"/>
	        <element name="extensions" minOccurs="0">
				<complexType>
					<sequence>
						<any minOccurs="0" maxOccurs="unbounded" processContents="lax"/> 
					</sequence>
				</complexType>
		   </element>
		</sequence>
	</complexType>
	<complexType name="UniqueGroupKey">
		<sequence>
			<element ref="xenc:EncryptedKey"/>
		</sequence>
	</complexType>
	<complexType name="UniqueDeviceKey">
		<sequence>
			<element ref="xenc:EncryptedKey"/>
		</sequence>
	</complexType>
	<complexType name="BroadcastRegistration">
		<complexContent>
			<extension base="roap:Extension">
				<sequence>
					<element name="subscriberGroupRegistration" type="roap:SubscriberGroupRegistration" minOccurs="0"/>
					<element name="rightsIssuerAuthenticationKey" type="roap:RightsIssuerAuthenticationKey" minOccurs="0"/>
					<element name="encKey" type="xenc:EncryptedKeyType"/>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<!-- this element shall be sent in an ExtensionContainer -->
	<element name="broadcastRegistration" type="roap:BroadcastRegistration"/>
	<complexType name="RightsIssuerAuthenticationKey">
		<sequence>
			<element ref="xenc:EncryptedKey"/>
		</sequence>
	</complexType>
	<!-- XBS extensions : usage metering -->
	<complexType name="TokenAcquisitionTrigger">
		<complexContent>
			<extension base="roap:BasicRoapTrigger">
				<sequence>
					<element name="tokenDeliveryID" type="ID"/>
					<any minOccurs="0" maxOccurs="unbounded" processContents="lax"/>
				</sequence>
				<attribute name="type" type="string" use="required" fixed="tokenAcquisition"/>
			</extension>
		</complexContent>
	</complexType>
	<element name="tokenRequest" type="roap:TokenRequest"/>
	<complexType name="TokenRequest">
		<annotation>
			<documentation xml:lang="en">
        Message sent from Device to RI to request tokens
      </documentation>
		</annotation>
		<complexContent>
			<extension base="roap:Request">
				<sequence>
					<element name="deviceID" type="roap:Identifier"/>
					<element name="riID" type="roap:Identifier"/>
					<element name="nonce" type="roap:Nonce"/>
					<element name="tokenDeliveryID" type="ID"/>
					<element name="certificateChain" type="roap:CertificateChain" minOccurs="0"/>
					<element name="extensions" type="roap:Extensions" minOccurs="0"/>
					<element name="signature" type="base64Binary"/>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<element name="tokenDeliveryResponse" type="roap:Response"/>
	<complexType name="TokenDeliveryResponse">
		<annotation>
			<documentation xml:lang="en">
        Message sent from RI to Device to deliver tokens
      </documentation>
		</annotation>
		<complexContent>
			<extension base="roap:Response">
				<sequence minOccurs="0">
					<element name="deviceID" type="roap:Identifier"/>
					<element name="riID" type="roap:Identifier"/>
					<element name="tokenDeliveryID" type="roap:Identifier"/>
					<element name="nonce" type="roap:Nonce" minOccurs="0"/>
					<element name="tokenQuantity" type="integer"/>
					<element name="tokenReportingURL" type="anyURI" minOccurs="0"/>
					<element name="earliestReportingTime" type="dateTime" minOccurs="0"/>
					<element name="latestReportingTime" type="dateTime" minOccurs="0"/>
					<element name="latestTokenConsumptionTime" type="dateTime" minOccurs="0"/>
					<element name="certificateChain" type="roap:CertificateChain" minOccurs="0"/>
					<element name="ocspResponse" type="base64Binary" minOccurs="0" maxOccurs="unbounded"/>
					<element name="extensions" type="roap:Extensions" minOccurs="0"/>
					<element name="signature" type="base64Binary"/>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<element name="tokenConsumptionReport" type="roap:TokenConsumptionReport"/>
	<complexType name="TokenConsumptionReport">
		<annotation>
			<documentation xml:lang="en">
        Message sent from Device to RI to report token consumption report
      </documentation>
		</annotation>
		<complexContent>
			<extension base="roap:Request">
				<sequence>
					<element name="deviceID" type="roap:Identifier"/>
					<element name="riID" type="roap:Identifier"/>
					<element name="nonce" type="roap:Nonce"/>
					<element name="tokenDeliveryID" type="ID"/>
					<element name="time" type="dateTime"/>
					<element name="tokensConsumed" type="nonNegativeInteger"/>
					<element name="certificateChain" type="roap:CertificateChain" minOccurs="0"/>
					<element name="extensions" type="roap:Extensions" minOccurs="0"/>
					<element name="signature" type="base64Binary"/>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<!-- XBS extensions : Subscriber Groups -->
	<complexType name="SubscriberGroupIdentifier">
		<sequence>
			<choice>
				<element name="subscriberGroupBase" type="base64Binary"/>
				<sequence>
					<element name="flexibleGroupAddress" type="base64Binary"/>
					<element name="uniqueDeviceFilter" type="base64Binary" minOccurs="0"/>
				</sequence>
			</choice>
			<choice minOccurs="0">
				<element name="subscriberAccessMask" type="base64Binary"/>
				<element name="subscriberPosition" type="base64Binary"/>
			</choice>
		</sequence>
	</complexType>
</schema>
