Re: XSD 1.1 Proposal: Naming wildcard extension sites

Hi Pete,

Pete Cordell <petexmldev@tech-know-ware.com> writes:

>    <xs:element name="Element1">
>        <xs:complexType>
>            <xs:sequence>
>                <xs:element name="Child1" type="xs:int"/>
>                <xs:any namespace="##other" maxOccurs="unbounded"
>                        processContents="lax" socket="Element1"/>
>            </xs:sequence>
>        </xs:complexType>
>    </xs:element>
>
>    <xs:element name="Element2">
>        <xs:complexType>
>            <xs:sequence>
>                <xs:element name="Child2" type="xs:int"/>
>                <xs:any namespace="##other" maxOccurs="unbounded"
>                        processContents="lax" socket="Element2"/>
>            </xs:sequence>
>        </xs:complexType>
>    </xs:element>
>
>
> ...
>
>
>    <xs:plugin socket="core:Element1">
>        <xs:element name="ExtensionElement" type="xs:int"
>                maxOccurs="unbounded"/>
>    </xs:plugin>

You can already do pretty much the same thing with substitution
groups. The only difference is that you will need to decide
whether your extension is going to be of simple or complex type.
But that can be easily overcome by providing two "extension points":
one with anyType and the other with anySimpleType.


-boris


--
Boris Kolpackov
Code Synthesis Tools CC
http://www.codesynthesis.com
Open-Source, Cross-Platform C++ XML Data Binding

Received on Sunday, 11 March 2007 21:23:27 UTC