- From: Henry S. Thompson <ht@cogsci.ed.ac.uk>
- Date: 15 Mar 2000 09:55:03 +0000
- To: "Eric Rehm" <rehm@singingfish.com>
- Cc: <www-xml-schema-comments@w3c.org>
"Eric Rehm" <rehm@singingfish.com> writes:
> I'd like to restrict the number of elements in a <sequence> by an attribute,
> e.g.,
>
> <!-- desired, but not currently valid, XML Schema -->
>
> <complexType name="VectorI">
> <attribute name="Size" type="integer"/>
> <sequence minOccurs="Size" maxOccurs="Size">
> <element name="ValueVectorI" type="integer"/>
> </sequence>
> </complexType>
>
> This seems like it would be a pretty common schema feature. Is
> there a way to do this?
Two classes of co-constraints were considered by the WG for XML Schema
but postponed for a later version:
co-occurrence constraints among the attributes and children of an
element, e.g. "this attribute XOR that attribute";
instance-parameterised constraints (you need one such to provide a
strict schema for an XSLT stylesheet).
Your requirement falls in to the latter category. We hope to provide
for it, but not in v.1.
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 Wednesday, 15 March 2000 04:55:06 UTC