Re: schema question

Lucky <[email protected]>
Newsgroups gmane.comp.mozilla.devel.layout.xslt
Organization Cox Communications
Message-ID <Udfce.207$RV5.139@lakeread08>
Parker Thompson wrote:
> Hi,
> 
> This is a schema rather than an xslt question, but I hope you can help.
> 
> I'd like to define an element (complexType) that *must* contain certain
> elements one or more times, but may additionally contain any other
> elements.  Further, I need all elements to be albe to appear in any order.
> 
> I have a suspicion this can be done with some xs:group wizardry, but I
> just can't seem to figure it out.  I'm hoping someone here can get me on
> the right track.
> 
> Thanks,
> 
> pt.
<xs:element name="foo">
  <xs:complexType>
   <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element name="bar"/>
    <xs:any namespace="##other"/>
   </xs:choice>
  </xs:complexType>
</xs:element>

will allow
<foo>
  <bar/>
  <bar/>
  <xi:include href=""/>
  <other xmlns="urn:mySchema"/>
</foo>

note: can be all or none; with no constraints on how many...
other words, you can't set a maxOccurs in these type of scenarios.

BUT: THIS IS NOT THE RIGHT NEWSGROUP!!!!!!
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.