[XML Schema 1.1] Two ways to create interleaved, any-order content ... are they identical?

Hi Folks,

Below are two ways to declare a <Book> element. 

Both versions use <all>, to permit the elements within <Book> to occur in any order. 

The first version uses an unbounded <any>. The second version uses interleaved open content. 

Are these two versions identical? If so, is there an advantage of one over the other? If they are not identical, how do they differ?

/Roger

 
VERSION #1

<xs:element name="Book">
    <xs:complexType>
        <xs:all>
            <xs:any maxOccurs="unbounded" />
            <xs:element name="Author" type="xs:string" />
            <xs:element name="Title" type="xs:string" />
            <xs:element name="Date" type="xs:string" />
            <xs:element name="ISBN" type="xs:string"/>
            <xs:element name="Publisher" type="xs:string" />
        </xs:all>
    </xs:complexType>
</xs:element>
 

VERSION #2

<xs:element name="Book">
    <xs:complexType>
        <xs:openContent mode="interleave">
            <xs:any />
        </xs:openContent>
        <xs:all>
            <xs:element name="Title" type="xs:string"/>
            <xs:element name="Author" type="xs:string" />
            <xs:element name="Date" type="xs:string"/>
            <xs:element name="ISBN" type="xs:string"/>
            <xs:element name="Publisher" type="xs:string"/>
        </xs:all>
    </xs:complexType>
</xs:element>

Received on Monday, 12 October 2009 17:01:11 UTC