<!DOCTYPE schema 
   PUBLIC "-//W3C//DTD XMLSCHEMA 200010//EN" http://www.w3.org/2000/10/XMLSchema.dtd 
  [
   <!ATTLIST schema xmlns:ds CDATA #FIXED "http://www.w3.org/2000/10/XMLSchema">
   <!ENTITY enc "http://www.w3.org/2000/11/temp-xmlenc"> 
   <!ENTITY enc 'http://www.w3.org/2000/11/xmlenc#'> 
   <!ENTITY dsig 'http://www.w3.org/2000/09/xmldsig#'> 
  ]> 

<schema xmlns="http://www.w3.org/2000/10/XMLSchema" 
      xmlns:ds="&dsig;" 
      xmlns:xenc="&enc;" 
      targetNamespace="&enc;" 
      version="0.1" 
      elementFormDefault="qualified"> 

<element name="EncryptedData"> 
  <complexType>
    <sequence>
      <element ref="xenc:EncryptedKey" minOccurs=O/ maxOccurs="unbounded"/>
      <element ref="xenc:EncryptionMethod" minOccurs=0/> 
      <element ref="ds:KeyInfo" minOccurs=0/> 
      <element ref="xenc:CipherText"/> 
    </sequence> 
    <attribute name="Id" type="ID" use="optional"/>
    <attribute name="Type" type="string" use="optional"/> 
  </complexType> 
</element>
 
<element name="EncryptedKey"> 
  <complexType> 
    <sequence> 
      <element ref="xenc:EncryptionMethod" minOccurs=0/> 
      <element ref="xenc:ReferenceList" minOccurs=0/> 
      <element ref="ds:KeyInfo" minOccurs=0/> 
      <element ref="xenc:CipherText1"/> 
    </sequence> 
    <attribute name="Id" type="ID" use="optional"/> 
    <attribute name="NameKey" type="string" use="optional"/> 
  </complexType> 
</element> 

<element name="EncryptedKeyReference"> 
  <complexType> 
    <sequence> 
      <element ref="ds:Transforms" minOccurs="0"/>
    </sequence> 
    <attribute name="URI" type="uriReference"/> 
  </complexType>
</element> 

<element name="EncryptionMethod">
  <complexType> 
    <sequence>
      <any namespace="##any" minOccurs="0" maxOccurs="unbounded"/>
    </sequence> 
    <attribute name="Algorithm" type="uriReference" use="required"/> 
  </complexType> 
</element> 

<element name="ReferenceList">
  <complexType>
    <sequence> 
      <element ref="xenc:DataReference" minOccurs="0" maxOccurs="unbounded"/> 
      <element ref="xenc:KeyReference" minOccurs="0" maxOccurs="unbounded"/>
    </sequence>
  </complexType> 
</element> 

<element name="DataReference"> 
  <complexType>
    <sequence> 
      <any namespace="##any" minOccurs="0" maxOccurs="unbounded"/>
    </sequence>
    <attribute name="URI" type="uriReference" use="optional"/>
  </complexType> 
</element> 

<element name="KeyReference">
  <complexType> 
    <sequence>
      <any namespace="##any" minOccurs="0" maxOccurs="unbounded"/>
    </sequence>
    <attribute name="URI" type="uriReference" use="optional"/>
  </complexType>
</element>

<element name="CipherText">
  <complexType>
    <choice>
      <element ref="xenc:CipherTextl"/>
      <element ref="xenc:CipherText2"/>
    </choice>
  </complexType>
</element> 

<element name="CipherTextl" type="ds:CryptoBinary"> 

<element name="CipherText2">
  <complexType>
    <sequence>
      <element ref="ds:transforms" minOccurs="0"/>
    </sequence>
  </complexType>
  <attribute name="URI" type="uriReference" use="required"/>
</element>
 
</schema>
