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

Nested Substitutiongroups, how to?

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

Hello all,

I have just now joined this list and have of course a question.

I am trying to convert a dtd to schema, and have the following problem:
In the DTD I have this:

<!ENTITY SmallGroup "A|B|C|D">
<!ENTITY LargeGroup "X|Y|Z|%LargeGroup;">

<!ELEMENT F (#PCDATA|%SmallGroup;)*>
<!ELEMENT G (#PCDATA|%LargeGroup;)*>

I am trying to convert it to schema, and can do something like:

<xs:element name="_SmallGroup" abstract="true"/>

<xs:element name="A" substitutionGroup="_SmallGroup"/>
<xs:element name="B" substitutionGroup="_SmallGroup"/>
<xs:element name="C" substitutionGroup="_SmallGroup"/>
<xs:element name="D" substitutionGroup="_SmallGroup"/>

But to have something like LargeGroup, which contains all of SmallGroup plus 
some other elements, how would I do this?

Hope this is possible.

Sincerely,
Svend Bent Nielsen

_________________________________________________________________
Få alle de nye og sjove ikoner med MSN Messenger http://messenger.msn.dk
Received on Tuesday, 14 October 2003 06:54:42 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:40 GMT