OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

sca-assembly message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Another reported schema issues, this time for sca-binding-sca.xsd


Description: The current complexType definition of SCABinding is incorrect, according to Oxygen9

SCABinding derives from sca:Binding by extension. However, SCABinding then duplicates all attribute names. Attributes on an element must, however, have unique names.

 

Removing the duplicate attributes does not work because then, according to Oxygen, the Unique Particle Attribution constraint is violated because of the duplication of the sequence of operation elements.

(There would be nothing to mark where the first sequence of operation elements ends and the second sequence begins.)

 

Shifting to derivation by restriction, the duplications cease to be a problem. However, the presence of the “anyAttribute” clause makes the derivation fail as a restriction (it is not present in the original base type).

 

    <complexType name="SCABinding">

        <complexContent>

            <restriction base="sca:Binding">

                                    <sequence>

                                                <element name="operation" type="sca:Operation" minOccurs="0"

                                                            maxOccurs="unbounded" />

                                    </sequence>

                                <attribute name="uri" type="anyURI" use="optional"/>

                                <attribute name="name" type="QName" use="optional"/>

                                <attribute name="requires" type="sca:listOfQNames"

                                    use="optional"/>

                                <attribute name="policySets" type="sca:listOfQNames"

                                    use="optional"/>

                <anyAttribute namespace="##any" processContents="lax"/>

            </restriction>

        </complexContent>

        </complexType>

 

    <complexType name="Binding" abstract="true">

            <sequence>

                        <element name="operation" type="sca:Operation" minOccurs="0"

                                    maxOccurs="unbounded" />

            </sequence>

        <attribute name="uri" type="anyURI" use="optional"/>

        <attribute name="name" type="QName" use="optional"/>

        <attribute name="requires" type="sca:listOfQNames" use="optional"/>

        <attribute name="policySets" type="sca:listOfQNames" use="optional"/>

    </complexType>

 

Proposal: One option is to shift to using derivation by restriction and put the anyAttribute clause back into the base class.

 

That is, replace the existing definition by

 

    <complexType name="Binding" abstract="true">

            <sequence>

                        <element name="operation" type="sca:Operation" minOccurs="0"

                                    maxOccurs="unbounded" />

            </sequence>

        <attribute name="uri" type="anyURI" use="optional"/>

        <attribute name="name" type="QName" use="optional"/>

        <attribute name="requires" type="sca:listOfQNames" use="optional"/>

        <attribute name="policySets" type="sca:listOfQNames" use="optional"/>

         <!—maybe change ##any to ##other? à

        <anyAttribute namespace="##any" processContents="lax"/>

    </complexType>

 

Another option is to stick to derivation by extension but only add the anyAttribute clause (use the empty sequence <sequence/> as an expansion).

 

    <complexType name="SCABinding">

        <complexContent>

            <restriction base="sca:Binding">

                                    <sequence/>

                <anyAttribute namespace="##any" processContents="lax"/>

            </restriction>

        </complexContent>

        </complexType>

 

Undoubtedly because it is a matter of using XSD, there are multitudes of other options as well.

 

 

 

 



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]