- From: Henry S. Thompson <ht@inf.ed.ac.uk>
- Date: Fri, 30 Apr 2004 10:06:26 +0100
- To: "Hirtle, David" <David.Hirtle@nrc-cnrc.gc.ca>
- Cc: "'xmlschema-dev@w3.org'" <xmlschema-dev@w3.org>
"Hirtle, David" <David.Hirtle@nrc-cnrc.gc.ca> writes: > A simple question: How does one "extend" a particle's occurrence range with > <redefine>? I am familiar with the specification's discussion of valid > restrictions (http://www.w3.org/TR/xmlschema-1/#cd-model-restriction), but > there seems to be no way to do the opposite of _extending_ an occurrence > range. > > For example: > > one.xsd > ------- > <xs:group name="some_group"> > <xs:sequence> > <xs:element ref="a"/> > </xs:sequence> > </xs:group> The following will achieve your goal, but it's clearly limited to certain restricted cases: two.xsd ------- <xs:redefine schemaLocation="one.xsd"> <xs:group name="some_group"> <xs:sequence> <xs:group ref="some_group"/> <xs:element ref="a" minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> </xs:group> </xs:redefine> This points towards a rather extreme design-for-change approach in which _all_ element references in content models are replaced by group references to single-element content models, so that you can change any aspect of the model by a subsequent group redefinition. ht -- Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh Half-time member of W3C Team 2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440 Fax: (44) 131 650-4587, e-mail: ht@inf.ed.ac.uk URL: http://www.ltg.ed.ac.uk/~ht/ [mail really from me _always_ has this .sig -- mail without it is forged spam]
Received on Friday, 30 April 2004 05:07:30 UTC