W3C home > Mailing lists > Public > xmlschema-dev@w3.org > October 2003

Re: Nested Substitutiongroups, how to?

From: Svend Bent Nielsen <jawsoap@hotmail.com>
Date: Tue, 14 Oct 2003 16:47:52 +0000
To: xmlschema-dev@w3.org
Message-ID: <BAY7-F90dPJlsYcnpUl000103ef@hotmail.com>

Hi again all,

I am not sure that I understand this substitutiongroup thing. I still have 
problems with it.

I have an element "Section" which can contain other "Section" as well as 
      |       \
Comment   Section
                  |       \
             Section   Comment

That is, Comment is a leaf node and can not ever contain other than text 

How would I make a substitutionGroup that explains this?
Or is the below method the right way of doing this?

<xs:element name="Section">
      <xs:element ref="Section" minOccurs="0" maxOccurs="unbounded"/>
      <xs:element name="Comment" type="xs:string" minOccurs="0" 

What if "Section" can also contain "_SmallGroup" (from earlier)? How can I 
write that?

Svend Bent Nielsen

NB: Something went wrong with my spamfilter, so I have only been receiving 
mails from this list for the past 15 minuttes, except for mails that where 
directed at me (which helped me define the problem and thus the solution, 

Få alle de nye og sjove ikoner med MSN Messenger http://messenger.msn.dk/
Received on Tuesday, 14 October 2003 12:47:53 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:56:03 UTC