0N/A<?xml version="1.0" encoding="UTF-8"?>
0N/A<!-- http://www.xml.com/lpt/a/2002/01/23/relaxng.html -->
0N/A<!-- http://www.oasis-open.org/committees/relax-ng/tutorial-20011203.html -->
0N/A<!-- http://www.zvon.org/xxl/XMLSchemaTutorial/Output/ser_wildcards_st8.html -->
0N/A<!-- http://lists.oasis-open.org/archives/relax-ng-comment/200206/maillist.html -->
0N/A
0N/A<grammar xmlns='http://relaxng.org/ns/structure/1.0'
0N/A xmlns:ds='http://www.w3.org/2000/09/xmldsig#'
0N/A xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
0N/A ns="http://www.w3.org/2001/04/xmlenc#"
0N/A datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
0N/A
0N/A <include href="http://www.w3.org/Signature/Drafts/xmldsig-core/xmldsig-core-schema.rng">
0N/A <!-- Used for DigestMethod, KeyInfoType and anyThing -->
0N/A <!-- Since xmldsig-core also has a start, I have to include it
0N/A in the include for redefinition. -->
0N/A <start>
0N/A <choice>
0N/A <!-- We get to define the permissible root elements! -->
0N/A <element name="EncryptedData"><ref name="EncryptedDataType"/></element>
0N/A <element name="EncryptedKey"><ref name="EncryptedKeyType"/></element>
0N/A </choice>
0N/A </start>
0N/A
0N/A <define name='anyThing'>
0N/A <zeroOrMore>
0N/A <choice>
0N/A <text/>
0N/A <element>
0N/A <anyName>
0N/A <except>
0N/A <nsName/>
0N/A <nsName ns='http://www.w3.org/2000/09/xmldsig#'/>
0N/A </except>
0N/A </anyName>
0N/A <ref name='anyThing'/>
0N/A <zeroOrMore>
0N/A <attribute>
0N/A <anyName/>
0N/A </attribute>
0N/A </zeroOrMore>
0N/A </element>
0N/A </choice>
0N/A </zeroOrMore>
0N/A </define>
0N/A
0N/A
0N/A </include>
0N/A
0N/A <!-- Import definitions from the xmldsig rng -->
0N/A
0N/A <define name="KeyInfoType" combine="interleave">
0N/A <zeroOrMore>
0N/A <choice>
0N/A <element name="EncryptedKey"><ref name="EncryptedKeyType"/></element>
0N/A <element name="AgreementMethod"><ref name="AgreementMethodType"/></element>
0N/A </choice>
0N/A </zeroOrMore>
0N/A </define>
0N/A
0N/A <define name="DigestMethodType" combine="choice">
0N/A <notAllowed/>
0N/A </define>
0N/A
0N/A <define name="TransformType" combine="choice">
0N/A <notAllowed/>
0N/A </define>
0N/A
0N/A <!-- Now redefined in the include statement
0N/A <define name="anyThing" combine="choice">
0N/A <notAllowed/>
0N/A </define>
0N/A -->
0N/A
0N/A <!-- End import -->
0N/A
0N/A
0N/A <define name="EncryptedDataType">
0N/A <ref name="EncryptedType"/>
0N/A </define>
0N/A
0N/A
0N/A <define name="EncryptedKeyType">
0N/A <ref name="EncryptedType"/>
0N/A <optional><element name='ReferenceList'>
0N/A <ref name="ReferenceListType"/></element>
0N/A </optional>
0N/A <optional><element name='CarriedKeyName'><data type="string"/></element></optional>
0N/A <optional><attribute name='Recipient'> <data type="string"/></attribute></optional>
0N/A </define>
0N/A
0N/A
0N/A <define name="EncryptedType">
0N/A <element name="EncryptionMethod"><ref name="EncryptionMethodType"/></element>
0N/A <optional>
0N/A <element name="KeyInfo" ns="http://www.w3.org/2000/09/xmldsig#">
0N/A <ref name="KeyInfoType"/>
0N/A </element>
0N/A </optional>
0N/A <optional>
0N/A <element name="CipherData"><ref name="CipherDataType"/></element>
0N/A </optional>
0N/A <optional>
0N/A <element name="EncryptionProperties"><ref name="EncryptionPropertiesType"/></element>
0N/A </optional>
0N/A <optional><attribute name="Id"><data type="ID"/></attribute></optional>
0N/A <optional><attribute name="Type"><data type="anyURI"/></attribute></optional>
0N/A <optional><attribute name="MimeType"><data type="string"/></attribute></optional>
0N/A <optional><attribute name="Encoding"><data type="anyURI"/></attribute></optional>
0N/A <optional><attribute name='xsi:schemaLocation'/></optional>
0N/A </define>
0N/A
0N/A <define name="EncryptionMethodType">
0N/A <zeroOrMore>
0N/A <choice>
0N/A <element name="KeySize">
0N/A <data type="integer"/>
0N/A </element>
0N/A <element name="OAEPparams">
0N/A <data type="base64Binary"/>
0N/A </element>
0N/A <text/>
0N/A <element name='DigestMethod' ns="http://www.w3.org/2000/09/xmldsig#">
0N/A <ref name="DigestMethodType"/>
0N/A </element>
0N/A </choice>
0N/A </zeroOrMore>
0N/A <attribute name="Algorithm"><data type="anyURI"/></attribute>
0N/A </define>
0N/A
0N/A
0N/A <define name="AgreementMethodType">
0N/A <zeroOrMore>
0N/A <choice>
0N/A <element name="KA-Nonce">
0N/A <data type="base64Binary"/>
0N/A </element>
0N/A <element name='DigestMethod' ns="http://www.w3.org/2000/09/xmldsig#">
0N/A <ref name="DigestMethodType"/>
0N/A </element>
0N/A <text/>
0N/A <element>
0N/A <nsName ns="http://www.w3.org/2000/09/xmldsig#"/>
0N/A <ref name="anyThing"/>
0N/A </element>
0N/A <element name="OriginatorKeyInfo"><ref name="KeyInfoType"/></element>
0N/A <element name="RecipientKeyInfo"><ref name="KeyInfoType"/></element>
0N/A </choice>
0N/A </zeroOrMore>
0N/A <attribute name="Algorithm"><data type="anyURI"/></attribute>
0N/A </define>
0N/A
0N/A
0N/A <define name="ReferenceListType">
0N/A <oneOrMore>
0N/A <choice>
0N/A <element name="DataReference">
0N/A <text/>
0N/A <attribute name="URI"><data type="anyURI"/></attribute>
0N/A </element>
0N/A <element name="KeyReference">
0N/A <text/>
0N/A <attribute name="URI"><data type="anyURI"/></attribute>
0N/A </element>
0N/A </choice>
0N/A </oneOrMore>
0N/A </define>
0N/A
0N/A
0N/A <define name="CipherDataType">
0N/A <choice>
0N/A <element name="CipherValue"><data type="base64Binary"/></element>
0N/A <element name="CipherReference">
0N/A <element name="Transforms">
0N/A <oneOrMore>
0N/A <element name='Transform' ns="http://www.w3.org/2000/09/xmldsig#">
0N/A <ref name='TransformType'/>
0N/A </element>
0N/A </oneOrMore>
0N/A </element>
0N/A <attribute name="URI">
0N/A <data type="anyURI"/>
0N/A </attribute>
0N/A </element>
0N/A </choice>
0N/A </define>
0N/A
0N/A
0N/A <define name="EncryptionPropertiesType">
0N/A <element name="EncryptionProperty">
0N/A <zeroOrMore>
0N/A <element>
0N/A <anyName/>
0N/A <text/>
0N/A </element>
0N/A </zeroOrMore>
0N/A <optional>
0N/A <attribute name="Target">
0N/A <data type="anyURI"/>
0N/A </attribute>
0N/A </optional>
0N/A <optional>
0N/A <attribute name="Id">
0N/A <data type="ID"/>
0N/A </attribute>
0N/A </optional>
0N/A </element>
0N/A
0N/A <optional>
0N/A <attribute name="Id">
0N/A <data type="ID"/>
0N/A </attribute>
0N/A </optional>
0N/A <zeroOrMore>
0N/A <attribute><nsName ns="http://www.w3.org/XML/1998/namespace"/></attribute>
0N/A </zeroOrMore>
0N/A </define>
0N/A
0N/A</grammar>