W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > January to March 2000

Parametric minOccurs, maxOccurs?

From: Eric Rehm <rehm@singingfish.com>
Date: Tue, 14 Mar 2000 21:04:25 -0800
To: <www-xml-schema-comments@w3c.org>
Message-ID: <NABBKIOLBMIGNJNIFNOMMEEKGCAA.rehm@singingfish.com>
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?

/eric rehm
singingfish.com
rehm@singingfish.com
Received on Wednesday, 15 March 2000 00:05:28 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Sunday, 6 December 2009 18:12:46 GMT