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

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: Schema constructs

[ Lists Home | Date Index | Thread Index ]

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





 

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

Copyright 2001 XML.org. This site is hosted by OASIS