[XMLSCHEMA-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

[XML Schema 1.1] <openContent> applies only to the children, not the grandchildren ... correct?

From: Costello, Roger L. <costello@mitre.org>
Date: Wed, 3 Jun 2009 14:41:48 -0400
To: "xmlschema-dev@w3.org" <xmlschema-dev@w3.org>
Message-ID: <9E51F88D5247B648908850C35A3BBB5003FD6BE6FF@IMCMBX3.MITRE.ORG>
[XML Schema 1.1] <openContent> applies only to the children

Hi Folks,

I want to confirm my understanding.

Consider this <Book> element with open content:

<element name="Book">
    <complexType>
        <openContent mode="interleaved">
            <any />
        </openContent>
        <sequence>
            <element name="Title" type="string"/>
            <element name="Author">
                <complexType>
                    <sequence>
                        <element name="FirstName" type="string"/>
                        <element name="LastName" type="string"/>
                    </sequence>
                </complexType>
            </element>
            <element name="Date" type="string"/>
            <element name="ISBN" type="string"/>
            <element name="Publisher" type="string"/>
        </sequence>
    </complexType>
</element>

Notice that the <Author> element has child elements, which are grandchildren of the <Book> element.

Extension elements can only be added before and after the *children* of Book. Extension elements cannot be added around the *grandchildren* of Book. Thus, extension elements cannot be added before or after <FirstName> and <LastName>.

Is this correct?

/Roger
Received on Wednesday, 3 June 2009 18:42:23 GMT

Subscribe to the Stylus Scoop newsletter for helpful XML tips and tutorials.
Email
First Name
Last Name
Company

Download Stylus Studio 6 XML Enterprise Edition

Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.