3MFConsortium / spec_core

3MF's Core specification
BSD 2-Clause "Simplified" License
55 stars 16 forks source link

Object incorrect extendability #67

Closed jordig100 closed 3 months ago

jordig100 commented 1 year ago

In one of the previous versions it was added the "any" in the sequence as:

<xs:complexType name="CT_Object">
    <xs:sequence>
        <xs:element ref="metadatagroup" minOccurs="0" maxOccurs="1"/>
        <xs:choice>
            <xs:element ref="mesh"/>
            <xs:element ref="components"/>
        </xs:choice>
        <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="2147483647"/>
    </xs:sequence>

However in order to extend to more types of objects, other than mesh or component, the "any" shoulb be place inside of the choice clause:

<xs:complexType name="CT_Object">
    <xs:sequence>
        <xs:element ref="metadatagroup" minOccurs="0" maxOccurs="1"/>
        <xs:choice>
            <xs:element ref="mesh"/>
            <xs:element ref="components"/>
                <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="2147483647"/>
        </xs:choice>
    </xs:sequence>
jordig100 commented 3 months ago

The any is finally left in the sequence, since this is the way used to extend with the alternatives in the production extension.