XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] Here's a hack to avoid the dreaded "Unique ParticleAttribution" error

Frank Steimke wrote:

why not

<xs:sequence>
  <xs:element name="Title" type="xs:string"/>
  <xs:choice>
    <xs:element name="ISBN" type="xs:string"/>
    <xs:element name="Edition" type="xs:string"/>
  </xs:choice>
</xs:sequence>

 

You are correct that for this example it is possible to factor out the declaration of the Title element. But there are examples where this is not possible, such as this:

 

<xs:choice>
    <xs:sequence>
        <xs:element name="ISBN" minOccurs="0" type="xs:string"/>
        <xs:element name="Title" type="xs:string"/>
    </xs:sequence>
    <xs:sequence>
        <xs:element name="Title" type="xs:string"/>
        <xs:element name="Edition" type="xs:string"/>
    </xs:sequence>
</xs:choice>

 

Notice that the ISBN element is optional, so we get the dreaded “Unique Particle Attribution” error.

 

/Roger

 


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


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS