W3C home > Mailing lists > Public > public-xmlsec@w3.org > August 2009

Schema for the new 2.0 transform element

From: <pratik.datta@oracle.com>
Date: Wed, 26 Aug 2009 07:28:44 -0700
Message-ID: <4A95469C.9090304@oracle.com>
To: XMLSec WG Public List <public-xmlsec@w3.org>
Schema for the new transform element

Note: The order of the elements does not matter in SelectionType and in 
CanonicalizationType, I was thinking of using an <xsd:all> but that was 
not allowing me to put in an <xsd:any>. So I used a <xsd:sequence> but 
even that is complaining about <xsd:any>, because all of the child 
elements are optional.



<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" 
xmlns:ds2="http://www.w3.org/2008/xmlsec/experimental" 
targetNamespace="http://www.w3.org/2008/xmlsec/experimental" 
elementFormDefault="qualified" attributeFormDefault="unqualified">
    <xs:complexType name="XMLSignature2_0Transform">
        <xs:sequence>
            <xs:element name="Selection" type="ds2:SelectionType"/>
            <xs:element name="Canonicalization" 
type="ds2:CanonicalizationType" minOccurs="0"/>
        </xs:sequence>
    </xs:complexType>
    <xs:complexType name="SelectionType">
        <xs:sequence>
            <xs:element name="URI" type="xs:string" minOccurs="0"/>
            <xs:element name="IncludedXPath" type="xs:string" 
minOccurs="0"/>
            <xs:element name="ExcludedXPath" type="xs:string" 
minOccurs="0"/>
            <xs:element name="EnvelopedSignature" type="xs:boolean" 
minOccurs="0"/>
            <xs:element name="ByteRange" type="xs:string" minOccurs="0"/>
            <xs:any namespace="##any" minOccurs="0"/>
        </xs:sequence>
        <xs:attribute name="type" type="xs:string" use="required"/>
        <xs:attribute name="subtype" type="xs:string" use="optional"/>
        <xs:anyAttribute namespace="##any"/>
    </xs:complexType>
    <xs:complexType name="CanonicalizationType">
        <xs:sequence>
            <xs:element name="ExclusiveMode" type="xs:boolean" 
minOccurs="0"/>
            <xs:element name="InclusiveNamespacePrefixList" minOccurs="0">
                <xs:simpleType>
                    <xs:list itemType="xs:string"/>
                </xs:simpleType>
            </xs:element>
            <xs:element name="IgnoreComments" type="xs:boolean" 
minOccurs="0"/>
            <xs:element name="TrimTextNodes " type="xs:boolean" 
minOccurs="0"/>
            <xs:element name="Serialization" minOccurs="0">
                <xs:simpleType>
                    <xs:restriction base="xs:string">
                        <xs:enumeration value="XML"/>
                        <xs:enumeration value="EXI"/>
                    </xs:restriction>
                </xs:simpleType>
            </xs:element>
            <xs:element name="PrefixRewrite" minOccurs="0">
                <xs:simpleType>
                    <xs:restriction base="xs:string">
                        <xs:enumeration value="none"/>
                        <xs:enumeration value="sequential"/>
                        <xs:enumeration value="derived"/>
                    </xs:restriction>
                </xs:simpleType>
            </xs:element>
            <xs:element name="SortAttributes" type="xs:boolean" 
minOccurs="0"/>
            <xs:element name="IgnoreDTD" type="xs:boolean" minOccurs="0"/>
            <xs:element name="ExpandEntities" type="xs:boolean" 
minOccurs="0"/>
            <xs:element name="XmlBaseAncestors" minOccurs="0">
                <xs:simpleType>
                    <xs:restriction base="xs:string">
                        <xs:enumeration value="none"/>
                        <xs:enumeration value="inherit"/>
                        <xs:enumeration value="combine"/>
                    </xs:restriction>
                </xs:simpleType>
            </xs:element>
            <xs:element name="XmlIdAncestors" minOccurs="0">
                <xs:simpleType>
                    <xs:restriction base="xs:string">
                        <xs:enumeration value="none"/>
                        <xs:enumeration value="inherit"/>
                        <xs:enumeration value=""/>
                    </xs:restriction>
                </xs:simpleType>
            </xs:element>
            <xs:element name="XmlLangAncestors" minOccurs="0">
                <xs:simpleType>
                    <xs:restriction base="xs:string">
                        <xs:enumeration value="none"/>
                        <xs:enumeration value="inherit"/>
                    </xs:restriction>
                </xs:simpleType>
            </xs:element>
            <xs:element name="XmlSpaceAncestors" minOccurs="0">
                <xs:simpleType>
                    <xs:restriction base="xs:string">
                        <xs:enumeration value="none"/>
                        <xs:enumeration value="inherit"/>
                    </xs:restriction>
                </xs:simpleType>
            </xs:element>
            <xs:element name="XsiTypeAware" type="xs:boolean" 
minOccurs="0"/>
            <xs:any namespace="##any" minOccurs="0"/>
        </xs:sequence>
        <xs:attribute name="algorithm" type="xs:string" use="required"/>
    </xs:complexType>
</xs:schema>
Received on Wednesday, 26 August 2009 14:30:06 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:43:59 GMT