[Home] [By Thread] [By Date] [Recent Entries]

  • From: Michael Kay <mike@s...>
  • To: Roger L Costello <costello@m...>
  • Date: Sun, 23 Jan 2022 23:11:23 +0000

Again it can be refactored as ( ( ISBN Title ) | (Title Edition?) )

Michael Kay
Saxonica

On 23 Jan 2022, at 22:54, Roger L Costello <costello@m...> wrote:

 
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]


Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member