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


James, David wrote:

> I want the tag 
> element to always be present and always followed by one or more of 
> lowscale, hiscale, hialarm, etc. in any order.

> The all group ( All the elements in 
> the group may appear once or not at all, and they may appear in any 
> order. ) ap p ears to be just what I want but it seems that it cannot be 
> nested within a sequence group.

Doesn't xs:all means that every element must appear once, or none of 
them?  That isn't what you want either.

My knowledge of W3C XML Schema is mostly limited to what Trang can do 
with RELAX NG.  I think what you want is the RELAX NG <interleave>, 
which isn't possible in W3C XML Schemas.  The closest Trang gets is:

   <xs:element name="modify">
     <xs:complexType>
       <xs:sequence>
         <xs:element ref="tag"/>
         <xs:choice minOccurs="0" maxOccurs="unbounded">
           <xs:element ref="lowscale"/>
           <xs:element ref="hiscale"/>
           <xs:element ref="hialarm"/>
         </xs:choice>
       </xs:sequence>
     </xs:complexType>
   </xs:element>

-- 
"Hanging is too good for a man who makes puns; he should be drawn and 
quoted."
         -- Fred Allen

OpenPGP digital signature


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