<?xml version='1.0'?> 
<!DOCTYPE schema 
   SYSTEM 'http://www.w3.org/1999/XMLSchema.dtd' 
  [ 
   <!ENTITY dsig 'http://www.w3.org/2000/02/xmldsig#'> 
  ]> 
  

<schema targetNamespace='&dsig;' 
   version='0.1' 
   xmlns='http://www.w3.org/1999/XMLSchema'
   xmlns:ds='&dsig;'> 

<!-- Start Signature -->

<element name='Signature'> 
  <complexType content='elementOnly'>
    <sequence minOccurs='1' maxOccurs='1'> 
      <element ref='ds:SignedInfo' minOccurs='1' maxOccurs='1'/> 
      <element ref='ds:SignatureValue' minOccurs='1' maxOccurs='1'/> 
      <element ref='ds:KeyInfo' minOccurs='0' maxOccurs='1'/> 
      <element ref='ds:Object' minOccurs='0' maxOccurs='unbounded'/> 
    </sequence>  
    <attribute name='Id' type='ID'/> 
  </complexType>
</element> 

<!-- Start SignedInfo -->

<element name='SignedInfo'> 
  <complexType content='elementOnly'>
    <sequence minOccurs='1' maxOccurs='1'> 
      <element ref='ds:CanonicalizationMethod' minOccurs='0' maxOccurs='1'/> 
      <element ref='ds:SignatureMethod' minOccurs='1' maxOccurs='1'/> 
      <element ref='ds:Reference' minOccurs='1' maxOccurs='unbounded'/> 
    </sequence>  
  <attribute name='Id' type='ID' use='optional'/> 
  </complexType>
</element> 

<element name='CanonicalizationMethod'> 
  <complexType content='elementOnly'>
    <any  minOccurs='0' maxOccurs='unbounded'/>
    <attribute name='Algorithm' type='uriReference' use='required'/> 
  </complexType>
</element> 

<element name='SignatureMethod'> 
  <complexType content='elementOnly'> 
    <any minOccurs='0' maxOccurs='unbounded'/>
    <attribute name='Algorithm' type='uriReference' use='required'/> 
   </complexType>
</element> 

<element name='HMACOutputLength' type='integer'/>

<element name='SignatureValue' type='string'/> 

<!-- Start Reference -->

<element name='Reference'> 
  <complexType content='elementOnly'>
    <sequence minOccurs='1' maxOccurs='1'> 
      <element ref='ds:Transforms' minOccurs='0' maxOccurs='1'/> 
      <element ref='ds:DigestMethod' minOccurs='1' maxOccurs='1'/> 
      <element ref='ds:DigestValue' minOccurs='1' maxOccurs='1'/> 
    </sequence>
    <attribute name='Id' type='ID' use='optional'/> 
    <attribute name='URI' type='uriReference' use='optional'/> 
    <attribute name='Type' type='uriReference' use='optional'/> 
  </complexType>
</element> 

<element name='Transforms' > 
  <complexType content='elementOnly'> 
    <element ref='ds:Transform' minOccurs='1' maxOccurs='unbounded'/>  
  </complexType>
</element> 

<element name='Transform'> 
  <complexType content='mixed'>
    <any minOccurs='0' maxOccurs='unbounded'/>
    <element name='Xpath' type='string'/> 
    <element name='XSLT' type='string'/>
    <attribute name='Algorithm' type='string' use='required'/> 
    <attribute name='MimeType' type='string' use='optional'/> 
    <attribute name='Charset' type='string' use='optional'/> 
  </complexType>
</element> 

<!-- End Reference -->

<element name='DigestMethod'> 
  <complexType content='elementOnly'> 
    <any minOccurs='0' maxOccurs='unbounded'/>
    <attribute name='Algorithm' type='uriReference' use='required'/> 
  </complexType>
</element> 

<element name='DigestValue' type='string'/> 


<!-- End SignedInfo -->

<!-- Start KeyInfo -->

<element name='KeyInfo'> 
  <complexType content='elementOnly'>
    <choice minOccurs='1' maxOccurs='1'>       
      <element name='KeyName' type='string'/> 
      <element ref='ds:KeyValue'/> 
      <element name='SubjectName' type='string'/> 
      <element name='RetrievalMethod' type='uriReference'/> 
      <element ref='ds:X509Data'/> 
      <element ref='ds:PGPData'/> 
      <element name='MgmtData' type='string' minOccurs='0' maxOccurs='1'/>
    </choice>
    <attribute name='Id' type='ID' use='optional'/> 
  </complexType>
</element> 


<element name='KeyValue'>
  <complexType content='mixed'>
    <choice minOccurs='1' maxOccurs='1'>
      <any minOccurs='0' maxOccurs='unbounded'/>
      <element ref='ds:DSAKeyValue'/>
      <element ref='ds:RSAKeyValue'/>
    </choice>
  </complexType >
</element>

<!-- Start X509Data -->

<element name='X509Data'> 
  <complexType content='elementOnly'> 
    <sequence minOccurs='1' maxOccurs='1'> 
      <choice minOccurs='1' maxOccurs='1'> 
        <element ref='ds:X509IssuerSerial'/>
        <element name='X509SKI' type='string'/> 
        <element name='X509SubjectName' type='string'/> 
      </choice>  
      <element name='X509Certificate' type='string' minOccurs='0' maxOccurs='unbounded'/> 
      <element name='X509CRL' type='string' minOccurs='0' maxOccurs='unbounded'/> 
    </sequence>
  </complexType>
</element> 

<element name='X509IssuerSerial'> 
   <complexType content='elementOnly'> 
    <sequence minOccurs='1' maxOccurs='1'> 
      <element name='X509IssuerName' type='string' minOccurs='1' maxOccurs='1'/> 
      <element name='X509SerialNumber' type='string' minOccurs='1' maxOccurs='1'/> 
    </sequence>
  </complexType>
</element> 

<!-- End X509Data -->

<element name='PGPData'> 
  <complexType content='elementOnly'> 
    <sequence minOccurs='1' maxOccurs='1'>
      <element name='PGPKeyID' type='string' minOccurs='1' maxOccurs='1'/> 
      <element name='PGPKeyPacket' type='string' minOccurs='1' maxOccurs='1'/> 
    </sequence>  
  </complexType>
</element> 

<!-- End KeyInfo -->

<!-- Start Object (Manifest, SignatureProperty) -->

<element name='Object' > 
  <complexType content='mixed'>
    <any minOccurs='1' maxOccurs='unbounded'/>
    <attribute name='Id' type='ID' use='optional'/> 
    <attribute name='MimeType' type='string' use='optional'/> 
    <attribute name='Encoding' type='uriReference' use='optional'/> 
  </complexType>
</element> 

<element name='Manifest'> 
  <complexType content='elementOnly'>
    <sequence minOccurs='1' maxOccurs='1'>
      <element ref='ds:Reference' minOccurs='1' maxOccurs='unbounded'/> 
    </sequence>  
    <attribute name='Id' type='ID' use='optional'/> 
  </complexType>
</element> 

<element name='SignatureProperties'> 
  <complexType content='elementOnly'> 
    <element ref='ds:SignatureProperty' minOccurs='1' maxOccurs='unbounded'/> 
    <attribute name='Id' type='ID' use='optional'/> 
  </complexType>
</element> 

<element name='SignatureProperty'> 
  <complexType content='mixed'> 
    <any namespace='##other' minOccurs='1' maxOccurs='unbounded'/>
    <attribute name='Target' type='uriReference' use='required'/> 
    </complexType>
</element> 

<!-- End Object (Manifest, SignatureProperty) -->

<!-- Start KeyValue Element-types -->

<element name='DSAKeyValue'> 
  <complexType content='elementOnly'> 
    <sequence minOccurs='1' maxOccurs='1'>
      <element name='ds:P' type='string' minOccurs='1' maxOccurs='1'/> 
      <element name='ds:Q' type='string' minOccurs='1' maxOccurs='1'/> 
      <element name='ds:G' type='string' minOccurs='1' maxOccurs='1'/> 
      <element name='ds:Y' type='string' minOccurs='1' maxOccurs='1'/> 
      <element name='ds:J' type='string' minOccurs='0' maxOccurs='1'/> 
    </sequence>
    <sequence minOccurs='0' maxOccurs='1'>
      <element name='ds:Seed' type='string' minOccurs='1' maxOccurs='1'/> 
      <element name='ds:PgenCounterQ' type='string' minOccurs='1' maxOccurs='1'/> 
    </sequence>
  </complexType>
</element>

<element name='RSAKeyValue'> 
  <complexType content='elementOnly'> 
    <element name='ds:Modulus' type='string' minOccurs='1' maxOccurs='1'/> 
    <element name='ds:Exponent' type='string' minOccurs='1' maxOccurs='1'/> 
  </complexType> 
</element>

<!-- End KeyValue Element-types -->

<!-- End Signature -->

</schema>


