How do I specify unordered, unbounded groups of children in a schema?
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Shane_Curcuru
Posted On:   Thursday, January 3, 2002 12:59 PM

What's the most efficient way in the current W3C XML Schemas to do the equivalent of a DTD's: <!ELEMENT parentElem (other* | foo* | bar?) > I.e. the parentElem should be able to have any number of other, foo, and bar elements in any order . All the simple ways to specify complexType content in schemas is either specifically ordered or uses 'all', which has a lot of restrictions. I think what I have to do is have an 'all' element of a group of choices or some sort of layered approach, so I can have as many 'meta-objects' as I want, where each meta-object can be any of other, foo, bar. But that seems awfully roundabout.    More>>

What's the most efficient way in the current W3C XML Schemas to do the equivalent of a DTD's:


			
<!ELEMENT parentElem (other* | foo* | bar?) >

I.e. the parentElem should be able to have any number of other, foo, and bar elements in any order . All the simple ways to specify complexType content in schemas is either specifically ordered or uses 'all', which has a lot of restrictions.

I think what I have to do is have an 'all' element of a group of choices or some sort of layered approach, so I can have as many 'meta-objects' as I want, where each meta-object can be any of other, foo, bar. But that seems awfully roundabout.

   <<Less
About | Sitemap | Contact