<?xml version='1.0'?> 
<!DOCTYPE schema 
   SYSTEM 'http://www.w3.org/TR/1999/WD-xmlschema-1-19991217/structures.dtd' 
  [ 
   <!ENTITY dsig 'http://www.w3.org/2000/01/xmldsig#'> 
  ]> 

<schema targetNamespace='&dsig;' 
   version='0.1' 
   xmlns='http://www.w3.org/1999/XMLSchema'
   xmlns:ds='&dsig;'> 

   <element name='Signature'> 
     <type content='elementOnly'>
       <group order='seq' 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='*'/> 
   	</group>  
   	<attribute name='Id' type='ID' minOccurs='0' maxOccurs='1'/> 
     </type> 
   </element> 

      <element name='SignedInfo'> 
        <type content='elementOnly'>
          <group order='seq' 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='*'/> 
      	</group>  
      	<attribute name='Id' type='ID' minOccurs='0' maxOccurs='1'/> 
        </type> 
      </element> 

      <element name='CanonicalizationMethod'> 
	 <type content='elementOnly'>
	    <attribute name='Algorithm' type='uri' minOccurs='1' maxOccurs='1'/> 
         </type> 
      </element> 

      <element name='SignatureMethod'> 
         <type content='elementOnly'> 
	    <attribute name='Algorithm' type='uri' minOccurs='1' maxOccurs='1'/> 
	 </type> 
      </element> 

                 <type name='encoded' source='string'>
                 <annotation>
                   <info>This should be derived from binary???</info>
                 </annotation>
               	<attribute name='Encoding' type='uri' default='&dsig;/Base64' 
               	           minOccurs='0' maxOccurs='1'/> 
                 </type> 

               <element name='SignatureValue' type='ds:encoded'/> 

      <element name='Reference'> 
        <type content='elementOnly'>
          <group order='seq' 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'/> 
          </group>
      	<attribute name='Id' type='ID' minOccurs='0' maxOccurs='1'/> 
      	<attribute name='URI' type='uri' minOccurs='0' maxOccurs='1'/> 
      	<attribute name='IDREF' type='IDREF' minOccurs='0' maxOccurs='1'/> 
      	<attribute name='Type' type='uri' minOccurs='0' maxOccurs='1'/> 
        </type> 
      </element> 

	<element name='Transforms' > 
	  <type content='elementOnly'> 
	    <element ref='ds:Transform' minOccurs='1' maxOccurs='*'/> 
	  </type> 
	</element> 

            <element name='Transform'> 
              <type content='mixed'>
            	<attribute name='Algorithm' type='string' minOccurs='1' maxOccurs='1'/> 
            	<attribute name='Type' type='uri' minOccurs='0' maxOccurs='1'/> 
            	<attribute name='Charset' type='string' minOccurs='0' maxOccurs='1'/> 
              </type> 
            </element> 

               <element name='DigestMethod'> 
                 <type content='elementOnly'> 
               	 <attribute name='Algorithm' type='uri' minOccurs='1' maxOccurs='1'/> 
                 </type> 
               </element> 

               <element name='DigestValue' type='ds:encoded'/> 

   <element name='KeyInfo'> 
     <type content='elementOnly'>
       <group order='choice' minOccurs='1' maxOccurs='1'>       
   	  <element name='KeyName' type='string'/> 
   	  <element name='KeyValue' type='string'/> 
   	  <element name='SubjectName' type='string'/> 
   	  <element name='RetrievalMethod' type='string'/> 
   	  <element ref='ds:X509Data'/> 
   	  <element ref='ds:PGPData'/> 
   	  <element name='MgmtData' type='string' minOccurs='0' maxOccurs='1'/>
   	  <any/>
       </group>
   	<attribute name='Id' type='ID' minOccurs='0' maxOccurs='1'/> 
     </type> 
   </element> 
  
   <element name='X509Data'> 
     <type content='elementOnly'> 
       <group order='seq' minOccurs='1' maxOccurs='1'> 
         <group order='choice' minOccurs='1' maxOccurs='1'> 
   	     <element ref='ds:X509IssuerSerial'/>
   	     <element name='X509SKI' type='string'/> 
   	     <element name='X509SubjectName' type='string'/> 
   	   </group>  
   	   <element name='X509Certificate' type='string' minOccurs='0' maxOccurs='*'/> 
   	   <element name='X509CRL' type='string' minOccurs='0' maxOccurs='*'/> 
       </group>
     </type> 
   </element> 

      <element name='X509IssuerSerial'> 
         <type content='elementOnly'> 
   	      <group order='seq' minOccurs='1' maxOccurs='1'> 
         	  <element name='X509IssuerName' type='string' minOccurs='1' maxOccurs='1'/> 
         	  <element name='X509SerialNumber' type='string' minOccurs='1' maxOccurs='1'/> 
         	</group>
         </type> 
       </element> 

   <element name='PGPData'> 
     <type content='elementOnly'> 
       <group order='seq' minOccurs='1' maxOccurs='1'>
   	  <element name='PGPKeyID' type='string' minOccurs='1' maxOccurs='1'/> 
   	  <element name='PGPKeyPacket' type='string' minOccurs='1' maxOccurs='1'/> 
   	</group>  
     </type> 
   </element> 


   <element name='Object' > 
     <type content='mixed'>
        <any namespace='##targetNamespace'/>
   	<attribute name='Id' type='ID' minOccurs='0' maxOccurs='1'/> 
   	<attribute name='Type' type='uri' minOccurs='0' maxOccurs='1'/> 
   	<attribute name='Encoding' type='uri' minOccurs='0' maxOccurs='1'/> 
     </type> 
   </element> 


   <element name='Parameter'> 
     <type content='mixed'> 
   	<attribute name='Encoding' type='uri' minOccurs='0' maxOccurs='1'/> 
     </type> 
   </element> 


   <element name='Manifest'> 
     <type content='elementOnly'>
       <group order='seq' minOccurs='1' maxOccurs='1'>
   	  <element ref='ds:Reference' minOccurs='1' maxOccurs='*'/> 
   	  <element ref='ds:Object' minOccurs='0' maxOccurs='*'/> 
   	</group>  
   	<attribute name='Id' type='ID' minOccurs='0' maxOccurs='1'/> 
     </type> 
   </element> 

   <element name='SignatureProperties'> 
     <type content='elementOnly'> 
   	<element ref='ds:SignatureProperty' minOccurs='1' maxOccurs='*'/> 
   	<attribute name='Id' type='ID' minOccurs='0' maxOccurs='1'/> 
     </type> 
   </element> 

      <element name='SignatureProperty'> 
        <type content='mixed'> 
        <any namespace='##other'/>
      	<attribute name='Target' type='IDREF' minOccurs='1' maxOccurs='1'/> 
        </type> 
      </element> 

	<element name='DSAKeyValue'> 
	  <type content='elementOnly'> 
	    <group order='seq' 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'/> 
	    </group>
	    <group order='seq' minOccurs='0' maxOccurs='1'>
	      <element name='ds:Seed' type='string' minOccurs='1' maxOccurs='1'/> 
	      <element name='ds:PgenCounterQ' type='string' minOccurs='1' maxOccurs='1'/> 
	    </group>
	  </type> 
	</element>

	<element name='RSAKeyValue'> 
	  <type content='elementOnly'> 
	    <element name='ds:Modulus' type='string' minOccurs='1' maxOccurs='1'/> 
	    <element name='ds:Exponent' type='string' minOccurs='1' maxOccurs='1'/> 
	  </type> 
	</element>

</schema>
