- From: Henry S. Thompson <ht@cogsci.ed.ac.uk>
- Date: 18 Aug 2000 17:14:38 +0100
- To: Norman Walsh <ndw@nwalsh.com>
- Cc: xmlschema-dev@w3.org
Norman Walsh <ndw@nwalsh.com> writes:
> Consider the following common case in DTDs:
>
> <!ENTITY % obj.mix "a|b|c">
> <!ENTITY % para.mix "d|e|f">
> <!ELEMENT foo (%obj.mix;|%para.mix;)+>
>
> I can't think of a way to express this idiom in XML Schema that
> retains obj.mix and para.mix as discrete "things" and combines them
> as necessary.
>
> Am I missing something?
I _think_ this is just two levels of equiv class (using 20000407
terminology and syntax):
<xs:element name='objOrPara' abstract='true'/>
<xs:element name='obj' abstract='true' equivClass='objOrPara'/>
<xs:element name='a' equivClass='obj'>...</xs:element>
<xs:element name='b' equivClass='obj'>...</xs:element>
<xs:element name='c' equivClass='obj'>...</xs:element>
<xs:element name='para' abstract='true' equivClass='objOrPara'/>
<xs:element name='d' equivClass='obj'>...</xs:element>
<xs:element name='e' equivClass='obj'>...</xs:element>
<xs:element name='f' equivClass='obj'>...</xs:element>
<xs:element name='foo'>
<xs:sequence>
<xs:element ref='objOrPara' minOccurs='1' maxOccurs='unbounded'/>
</xs:sequence>
</xs:element>
ht
--
Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
W3C Fellow 1999--2001, part-time member of W3C Team
2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk
URL: http://www.ltg.ed.ac.uk/~ht/
Received on Friday, 18 August 2000 12:14:41 UTC