<!-- DTD for XML Signatures
    http://www.w3.org/2000/09/xmldsig#
    Joseph Reagle $last changed 20001215$

    http://www.w3.org/2000/09/xmldsig#
    $Revision: 1.1 $ on $Date: 2002/02/08 20:32:26 $ by $Author: reagle $

    Copyright 2001 The Internet Society and W3C (Massachusetts Institute
    of Technology, Institut National de Recherche en Informatique et en
    Automatique, Keio University). All Rights Reserved.
    http://www.w3.org/Consortium/Legal/

    This document is governed by the W3C Software License [1] as described
    in the FAQ [2].

    [1] http://www.w3.org/Consortium/Legal/copyright-software-19980720
    [2] http://www.w3.org/Consortium/Legal/IPR-FAQ-20000620.html#DTD
-->


<!--

The following entity declarations enable external/flexible content in
the Signature content model.

#PCDATA emulates schema string; when combined with element types it
emulates schema's mixed content type.

%foo.ANY permits the user to include their own element types from
other namespaces, for example:
 <!ENTITY % KeyValue.ANY '| ecds:ECDSAKeyValue'>
 ...
 <!ELEMENT ecds:ECDSAKeyValue (#PCDATA)  >

-->

<!ENTITY % Object.ANY ''>
<!ENTITY % Method.ANY ''>
<!ENTITY % Transform.ANY ''>
<!ENTITY % SignatureProperty.ANY ''>
<!ENTITY % KeyInfo.ANY ''>
<!ENTITY % KeyValue.ANY ''>
<!ENTITY % PGPData.ANY ''>
<!ENTITY % X509Data.ANY ''>
<!ENTITY % SPKIData.ANY ''>



<!-- Start Core Signature declarations, these should NOT be altered -->

<!ELEMENT Signature (SignedInfo, SignatureValue, KeyInfo?, Object*)  >
<!ATTLIST Signature  
	xmlns	CDATA	#FIXED 'http://www.w3.org/2000/09/xmldsig#'
	Id  	ID	#IMPLIED >

<!ELEMENT SignatureValue (#PCDATA) >
<!ATTLIST SignatureValue  
         Id  ID      #IMPLIED>

<!ELEMENT SignedInfo (CanonicalizationMethod, 
	SignatureMethod,  Reference+)  >
<!ATTLIST SignedInfo  
	Id	 ID 	 #IMPLIED 
>

<!ELEMENT CanonicalizationMethod (#PCDATA %Method.ANY;)* > 
<!ATTLIST CanonicalizationMethod 
	Algorithm CDATA #REQUIRED > 

<!ELEMENT SignatureMethod (#PCDATA|HMACOutputLength %Method.ANY;)* >
<!ATTLIST SignatureMethod 
	Algorithm CDATA #REQUIRED > 

<!ELEMENT Reference (Transforms?, DigestMethod, DigestValue)  >
<!ATTLIST Reference
	Id	ID	#IMPLIED
	URI	CDATA	#IMPLIED
	Type	CDATA	#IMPLIED>


<!ELEMENT Transforms (Transform+)>

<!ELEMENT Transform (#PCDATA|XPath %Transform.ANY;)* >
<!ATTLIST Transform 
	Algorithm    CDATA    #REQUIRED >

<!ELEMENT XPath (#PCDATA) >

<!ELEMENT DigestMethod (#PCDATA %Method.ANY;)* >
<!ATTLIST DigestMethod  
	Algorithm		CDATA	#REQUIRED >

<!ELEMENT DigestValue  (#PCDATA)  >

<!ELEMENT KeyInfo	(#PCDATA|KeyName|KeyValue|RetrievalMethod|
           X509Data|PGPData|SPKIData|MgmtData %KeyInfo.ANY;)* >
<!ATTLIST KeyInfo
	Id	ID	 #IMPLIED >

<!-- Key Information -->

<!ELEMENT KeyName (#PCDATA) >
<!ELEMENT KeyValue (#PCDATA|DSAKeyValue|RSAKeyValue %KeyValue.ANY;)* >
<!ELEMENT MgmtData (#PCDATA) >

<!ELEMENT RetrievalMethod (Transforms?) >
<!ATTLIST RetrievalMethod
  URI	CDATA #REQUIRED 
  Type	CDATA #IMPLIED > 

<!-- X.509 Data -->

<!ELEMENT X509Data ((X509IssuerSerial | X509SKI | X509SubjectName |
                    X509Certificate | X509CRL )+ %X509Data.ANY;)>
<!ELEMENT X509IssuerSerial (X509IssuerName, X509SerialNumber) >
<!ELEMENT X509IssuerName (#PCDATA) >
<!ELEMENT X509SubjectName (#PCDATA) >
<!ELEMENT X509SerialNumber (#PCDATA) >
<!ELEMENT X509SKI (#PCDATA) >
<!ELEMENT X509Certificate (#PCDATA) >
<!ELEMENT X509CRL (#PCDATA) >

<!-- PGPData -->

<!ELEMENT PGPData ((PGPKeyID, PGPKeyPacket?) | (PGPKeyPacket) %PGPData.ANY;) >
<!ELEMENT PGPKeyPacket  (#PCDATA)  >
<!ELEMENT PGPKeyID  (#PCDATA)  >

<!-- SPKI Data -->

<!ELEMENT SPKIData (SPKISexp %SPKIData.ANY;)  >
<!ELEMENT SPKISexp  (#PCDATA)  >

<!-- Extensible Content -->

<!ELEMENT Object (#PCDATA|Signature|SignatureProperties|Manifest %Object.ANY;)* >
<!ATTLIST Object  
	Id	ID	#IMPLIED
	MimeType	CDATA	#IMPLIED
	Encoding	CDATA	#IMPLIED >

<!ELEMENT Manifest (Reference+)  >
<!ATTLIST Manifest  
	Id	ID	#IMPLIED >

<!ELEMENT SignatureProperties (SignatureProperty+)  >
<!ATTLIST SignatureProperties  
	Id	ID	 #IMPLIED  >

<!ELEMENT SignatureProperty (#PCDATA %SignatureProperty.ANY;)* >
<!ATTLIST SignatureProperty  
	Target 	CDATA	 #REQUIRED
	Id	ID	 #IMPLIED  >

<!-- Algorithm Parameters -->

<!ELEMENT HMACOutputLength (#PCDATA) >

<!ELEMENT DSAKeyValue ((P, Q)?, G?, Y, J?, (Seed, PgenCounter)?) >
<!ELEMENT P (#PCDATA) >
<!ELEMENT Q (#PCDATA) >
<!ELEMENT G (#PCDATA) >
<!ELEMENT Y (#PCDATA) >
<!ELEMENT J (#PCDATA) >
<!ELEMENT Seed (#PCDATA) >
<!ELEMENT PgenCounter (#PCDATA) >

<!ELEMENT RSAKeyValue (Modulus, Exponent) > 
<!ELEMENT Modulus (#PCDATA) >
<!ELEMENT Exponent (#PCDATA) >

