<?xml version="1.0" encoding="UTF-8"?>
<!--                                                                           						 -->
<!-- Schema defining the additional element used for DSS XAdES profile 	 -->
<!-- This schema extends the OASIS DSS core schema.                             -->
<!--                                                                           						 -->
<!-- version : wd-01, 20 January. 2005                                        		  -->
<!-- author  : Juan Carlos Cruellas                                              		   -->
<!--                                                                           						 -->
<xs:schema targetNamespace="http://www.docs.oasis-open.org/dss/2004/12/oasis-dss-1.0-profiles-XAdES-cd-01#"   xmlns="http://docs.oasis-open.org/dss/2004/12/oasis-dss-1.0-profiles-XAdES-cd-01#" xmlns:xades="http://uri.etsi.org/01903/v1.2.2#" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
	<xs:import namespace="urn:oasis:names:tc:dss:1.0:core:schema" schemaLocation="http://docs.oasis-open.org/dss/2004/12/oasis-dss-1.0-core-schema-cd-02.xsd"/>
	<xs:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="http://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd"/>
	<xs:import namespace="http://uri.etsi.org/01903/v1.2.2#" schemaLocation="http://uri.etsi.org/01903/v1.2.2/XAdES.xsd"/>

<!--  Element for selecting the form of the signature the client refers to-->
<xs:element name="SignatureForm" type="xs:anyURI"/>

<!--  Element for passing to the server information on the commitment undertaken by the requester of the signature generation -->

<xs:element name="Commitment">
    <xs:complexType>
        <xs:choice>
            <xs:element ref="xades:CommitmentTypeIndication"/>
            <xs:element name="BinaryValue" type="xs:base64Binary"/>
        </xs:choice>
    </xs:complexType>
</xs:element>

<!--  Element for passing to the server information on the role of the requester of the signature generation -->

<xs:element name="SignerRole">
    <xs:complexType>
        <xs:choice>
            <xs:element ref="xades:SignerRole"/>
            <xs:element name="BinaryValue" type="xs:base64Binary"/>
        </xs:choice>
    </xs:complexType>
</xs:element>

<!--  Element for passing to the server the documents that the requester wants to be timestamped before being signed -->

<xs:element name="DocsToBeTimeStamped" type="DocReferencesType"/>

<xs:complexType name="DocReferencesType">
   <xs:sequence>
      <xs:element name="DocReference" maxOccurs="unbounded"
         type="DocReferenceType"/>
   </xs:sequence>
</xs:complexType>

<xs:complexType name="DocReferenceType">
   <xs:attribute name="WhichDocument" type="xs:IDREF"
      use="required"/>
   <xs:attribute name="RefId" type="xs:string" use="optional"/>
</xs:complexType>

<!--  Element for passing to the server individual information on the format of the documents to be signed  -->

<xs:element name="DocsFormat" type="DocsFormatType"/>

<xs:complexType name="DocsFormatType">
    <xs:sequence>
        <xs:choice>
            <xs:element name="DocFormat" type="DocFormatType" maxOccurs="unbounded"/>
            <xs:element name="BinaryValue" type="xs:base64Binary"/>
        </xs:choice>
    </xs:sequence>
</xs:complexType>

<xs:complexType name="DocFormatType">
    <xs:complexContent>
        <xs:extension base="DocReferenceType">
            <xs:sequence>
                <xs:element ref="xades:DataObjectFormat"/>
            </xs:sequence >
        </xs:extension>
    </xs:complexContent>
</xs:complexType>


</xs:schema>

