« Return to Thread: Schema

Schema

by lissette :: Rate this Message:

Reply to Author | View in Thread

I have this schema, I have not done it but I need this because other Schema import this:

<?xml version="1.0" encoding="UTF-8" ?>
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" targetNamespace="http://www.w3.org/2000/09/xmldsig#" version="0.1" elementFormDefault="qualified">
        <!-- Basic Types Defined for Signatures -->
        <simpleType name="CryptoBinary">
                <restriction base="binary">
                        <encoding value="base64" />
                </restriction>
        </simpleType>
        <!-- Start Signature -->
        <element name="Signature">
                <complexType>
                        <sequence>
                                <element ref="ds:SignedInfo" />
                                <element ref="ds:SignatureValue" />
                                <element ref="ds:KeyInfo" minOccurs="0" />
                                <element ref="ds:Object" minOccurs="0" maxOccurs="unbounded" />
                        </sequence>
                        <attribute name="Id" type="ID" use="optional" />
                </complexType>
        </element>
        <!-- Start SignedInfo -->
        <element name="SignedInfo">
                <complexType>
                        <sequence>
                                <element ref="ds:CanonicalizationMethod" />
                                <element ref="ds:SignatureMethod" />
                                <element ref="ds:Reference" maxOccurs="unbounded" />
                        </sequence>
                        <attribute name="Id" type="ID" use="optional" />
                </complexType>
        </element>
        <element name="CanonicalizationMethod">
                <complexType>
                        <sequence>
                                <any namespace="##any" minOccurs="0" maxOccurs="unbounded" />
                        </sequence>
                        <attribute name="Algorithm" type="uriReference" use="required" />
                </complexType>
        </element>
        <element name="SignatureMethod">
                <complexType>
                        <sequence>
                                <any namespace="##any" minOccurs="0" maxOccurs="unbounded" />
                        </sequence>
                        <attribute name="Algorithm" type="uriReference" use="required" />
                </complexType>
        </element>
        <element name="SignatureValue" type="ds:CryptoBinary" />
        <!-- Start Reference -->
        <element name="Reference">
                <complexType>
                        <sequence>
                                <element ref="ds:Transforms" minOccurs="0" />
                                <element ref="ds:DigestMethod" />
                                <element ref="ds:DigestValue" />
                        </sequence>
                        <attribute name="Id" type="ID" use="optional" />
                        <attribute name="URI" type="uriReference" use="optional" />
                        <attribute name="Type" type="uriReference" use="optional" />
                </complexType>
        </element>
        <element name="Transforms">
                <complexType>
                        <sequence>
                                <element ref="ds:Transform" maxOccurs="unbounded" />
                        </sequence>
                </complexType>
        </element>
        <element name="Transform">
                <complexType>
                        <choice maxOccurs="unbounded">
                                <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
                                <element name="XSLT" type="string" />
                                <!--should be an xsl:stylesheet element -->
                                <element name="XPath" type="string" />
                        </choice>
                        <attribute name="Algorithm" type="uriReference" use="required" />
                </complexType>
        </element>
        <!-- End Reference -->
        <element name="DigestMethod">
                <complexType>
                        <sequence>
                                <any processContents="lax" minOccurs="0" maxOccurs="unbounded" namespace="##any" />
                        </sequence>
                        <attribute name="Algorithm" type="uriReference" use="required" />
                </complexType>
        </element>
        <element name="DigestValue" type="ds:CryptoBinary" />
        <!--  End SignedInfo -->
        <!--  Start KeyInfo -->
        <element name="KeyInfo">
                <complexType>
                        <choice maxOccurs="unbounded">
                                <any processContents="lax" namespace="##other" minOccurs="0" maxOccurs="unbounded" />
                                <element name="KeyName" type="string" />
                                <element ref="ds:KeyValue" />
                                <element ref="ds:RetrievalMethod" />
                                <element ref="ds:X509Data" />
                                <element ref="ds:PGPData" />
                                <element ref="ds:SPKIData" />
                                <element name="MgmtData" type="string" />
                        </choice>
                        <attribute name="Id" type="ID" use="optional" />
                </complexType>
        </element>
        <element name="KeyValue">
                <complexType mixed="true">
                        <choice>
                                <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
                                <element ref="ds:DSAKeyValue" />
                                <element ref="ds:RSAKeyValue" />
                        </choice>
                </complexType>
        </element>
        <element name="RetrievalMethod">
                <complexType>
                        <sequence>
                                <element ref="ds:Transforms" minOccurs="0" />
                        </sequence>
                        <attribute name="URI" type="uriReference" />
                        <attribute name="Type" type="uriReference" use="optional" />
                </complexType>
        </element>
        <!-- Start X509Data -->
        <element name="X509Data">
                <complexType>
                        <choice>
                                <sequence maxOccurs="unbounded">
                                        <choice>
                                                <element ref="ds:X509IssuerSerial" />
                                                <element name="X509SKI" type="ds:CryptoBinary" />
                                                <element name="X509SubjectName" type="string" />
                                                <element name="X509Certificate" type="ds:CryptoBinary" />
                                        </choice>
                                </sequence>
                                <element name="X509CRL" type="ds:CryptoBinary" />
                        </choice>
                </complexType>
        </element>
        <element name="X509IssuerSerial">
                <complexType>
                        <sequence>
                                <element name="X509IssuerName" type="string" />
                                <element name="X509SerialNumber" type="integer" />
                        </sequence>
                </complexType>
        </element>
        <!-- End X509Data -->
        <!-- Begin PGPData -->
        <element name="PGPData">
                <complexType>
                        <choice>
                                <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
                                <sequence>
                                        <element name="PGPKeyID" type="string" />
                                        <element name="PGPKeyPacket" type="ds:CryptoBinary" />
                                </sequence>
                        </choice>
                </complexType>
        </element>
        <!-- End PGPData -->
        <!-- Begin SPKIData -->
        <element name="SPKIData" type="string" />
        <!--  End SPKIData -->
        <!--  End KeyInfo -->
        <!--  Start Object (Manifest, SignatureProperty) -->
        <element name="Object">
                <complexType mixed="true">
                        <sequence maxOccurs="unbounded">
                                <any namespace="##any" processContents="lax" />
                        </sequence>
                        <attribute name="Id" type="ID" use="optional" />
                        <attribute name="MimeType" type="string" use="optional" />
                        <!--  add a grep facet -->
                        <attribute name="Encoding" type="uriReference" use="optional" />
                </complexType>
        </element>
        <element name="Manifest">
                <complexType>
                        <sequence>
                                <element ref="ds:Reference" maxOccurs="unbounded" />
                        </sequence>
                        <attribute name="Id" type="ID" use="optional" />
                </complexType>
        </element>
        <element name="SignatureProperties">
                <complexType>
                        <sequence>
                                <element ref="ds:SignatureProperty" maxOccurs="unbounded" />
                        </sequence>
                        <attribute name="Id" type="ID" use="optional" />
                </complexType>
        </element>
        <element name="SignatureProperty">
                <complexType mixed="true">
                        <choice minOccurs="0" maxOccurs="unbounded">
                                <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
                        </choice>
                        <attribute name="Target" type="uriReference" use="required" />
                        <attribute name="Id" type="ID" use="optional" />
                </complexType>
        </element>
        <!-- End Object (Manifest, SignatureProperty) -->
        <!--  Start Algorithm Parameters -->
        <element name="HMACOutputLength" type="integer" />
        <!--  Start KeyValue Element-types -->
        <element name="DSAKeyValue">
                <complexType>
                        <sequence>
                                <sequence>
                                        <element name="P" type="ds:CryptoBinary" />
                                        <element name="Q" type="ds:CryptoBinary" />
                                        <element name="G" type="ds:CryptoBinary" />
                                        <element name="Y" type="ds:CryptoBinary" />
                                        <element name="J" type="ds:CryptoBinary" minOccurs="0" />
                                </sequence>
                                <sequence minOccurs="0">
                                        <element name="Seed" type="ds:CryptoBinary" />
                                        <element name="PgenCounter" type="ds:CryptoBinary" />
                                </sequence>
                        </sequence>
                </complexType>
        </element>
        <element name="RSAKeyValue">
                <complexType>
                        <sequence>
                                <element name="Modulus" type="ds:CryptoBinary" />
                                <element name="Exponent" type="ds:CryptoBinary" />
                        </sequence>
                </complexType>
        </element>
        <!-- End KeyValue Element-types -->
        <!--  End Signature -->
</schema>

I obtain this error:
Element enconding is not allowed under element restriction. Could you help me? What element put under restriction? thanks very much

 « Return to Thread: Schema