<?xml version='1.0' ?>
<!DOCTYPE schema 
   SYSTEM 'http://www.w3.org/TR/1999/WD-xmlschema-1-19991105/structures.dtd'
[
  <!ENTITY dsig 'http://www.w3.org/1999/10/signature-core'>
]>

<schema 
   xmlns='http://www.w3.org/1999/XMLSchema'
   targetNS='http://www.w3.org/1999/10/signature-core' 
   version='0.1'>
   
   <textEntity name="dsig">http://www.w3.org/1999/10/signature-core</textEntity>
   
   <element name="Signature">
      <archetype order="seq" content="elemOnly">
         <element ref="SignedInfo"/>
         <element ref="SignatureValue"/>
         <element ref="KeyInfo" minOccurs="0" maxOccurs="1"/>
         <element ref="Object" minOccurs="0" maxOccurs="*"/>
      </archetype>
   </element>
   
      <element name='SignatureValue' type='string'>
        <archetype>
          <attribute name='Algorithm' type='string' />
          <attribute name='Encoding' type='string' default="&dsig;/Base64"/>
        </archetype>
      </element>
      
      <element name='SignedInfo'>
         <archetype order='seq' content='elemOnly'>
            <element ref='CanonicalizationMethod'/>
            <element ref='SignatureMethod'/>
            <element ref='ObjectReference' minOccurs='0' maxOccurs='*'/>
            <attribute name='Id' type='ID' />
         </archetype>
      </element>
      
      
         <element name='CanonicalizationMethod'>
            <archetype>
               <attribute name='Algorithm' type='uri' />
            </archetype>
         </element>

         <element name='SignatureMethod'>
            <archetype>
               <attribute name='Algorithm' type='uri' />
            </archetype>
         </element>
         
         <element name='ObjectReference' minOccurs='1' maxOccurs='*'>
            <archetype order='seq'>
               <element ref='Transforms' minOccurs='0' maxOccurs='*'/>
               <element ref='DigestMethod'/>
               <element ref='DigestValue'/>
               <attribute name='Id' type='ID' />
               <attribute name='URI' type='uri' />
               <attribute name='IDREF' type='IDREF' />
               <attribute name='Type' type='string' />
            </archetype>
         </element>
         
         
            <element name='Transforms' minOccurs='0' maxOccurs='1'>
               <archetype>
                  <element ref='Transform'/>
                  <attribute name='Algorithm' type='string' />
              </archetype>
            </element>
   
                 <element name='Transform' minOccurs='1' maxOccurs='*'>
                     <archetype>
                        <attribute name='Algorithm' type='uri' />
                        <attribute name='Encoding' type='uri' />
                        <attribute name='Type' type='uri' />
                     </archetype>
                  </element>
   

            <element name='DigestMethod'>
               <archetype>
                  <element name='Parameter' minOccurs='0' maxOccurs='*'/>
                  <attribute name='Algorithm' type='uri' />
               </archetype>
            </element>


            <element name='DigestValue' type='string'>
              <archetype>
                <attribute name='Encoding' type='uri' default='&dsig;/Base64' />
              </archetype>
            </element>
   
   <element name='KeyInfo' minOccurs='0' maxOccurs='1'>
      <archetype order='seq' content='elemOnly'>
         <element name='KeyName' type='string' />
         <element name='KeyValue' type='string' />
         <element name='SubjectName' type='string' />
         <element name='RetrievalMethod' type='string' />
         <element ref='X509Data' type='string'/>
         <element ref='PGPData' type='string'/>
         <element name='MgmtData' type='string' minOccurs='0' maxOccurs='1'/>
      </archetype>
   </element>   

      <element name='X509Data' type='string'>
         <archetype order='seq' content='any'>
            <element name='X509IssuerSerial' type='string'>
               <archetype order='seq' content='elemOnly'>
                 <element name='X509Name' type='string' />
                 <element name='X509SerialNumber' type='string' />
               </archetype>
             </element>
             <element name='X509SKI' type='string' />
             <element name='X509Name' type='string' />
             <element name='X509Certificate' type='string' />
             <element name='X509CRL' type='string' />
         </archetype>
      </element>
      
       <element name='PGPData' type='string'>
         <archetype order='seq' content='elemOnly'>
            <element name='PGPKeyID' type='string' />
            <element name='PGPKeyPacket' type='string' />
         </archetype>
       </element>
       
      <element name='MgmtData' type='string' minOccurs='0' maxOccurs='1'/>
       
   <element name='Object' minOccurs='0' maxOccurs='*'>
      <archetype>
         <attribute name='Id' type='ID' />
         <attribute name='Type' type='uri' />
         <attribute name='Encoding' type='uri' />
      </archetype>
   </element>
   
   <element name='Package' minOccurs='0' maxOccurs='*'>
      <archetype>
         <element ref='ObjectReference'/>
         <element ref='Object'/>
         <attribute name='Id' type='id' />
      </archetype>
   </element>

   <element name='Property' minOccurs='0' maxOccurs='*'>
      <archetype content='any'>
         <attribute name='Target' type='idref' />
      </archetype>
   </element>

</schema>
