W3C home > Mailing lists > Public > xmlschema-dev@w3.org > September 2000

list attribute - type or itemType

From: Roger L. Costello <costello@mitre.org>
Date: Sat, 23 Sep 2000 14:17:44 -0400
Message-ID: <39CCF3C8.27DE276D@mitre.org>
To: xmlschema-dev@w3.org
CC: costello@mitre.org
The XMLSchema.dtd says that the attribute of <list> is type.  The Primer
shows it as itemType.  Running the following in xsv:

    <simpleType name="NumbersList">
        <list type="positiveInteger"/>

I get an error: list must have a type attribute.

Which is it: type or itemType?

Another question while I am at it:  I wish to create a list of
positiveInteger, where the list is restricted to six positiveInteger.  I
could break it out into two separate simpleType definitions, as the
Primer does.  However, I would like to do it all in one shot.  Here's my

    <simpleType name="LotteryNumbers">
        <list type="positiveInteger">
                <length value="6"/>

Is this correct?  Note that <restriction> does not have a base attribute
(the DTD says base is optional).  Since it does not have a base
attribute does it "inherit" the list type (i.e., inherit the type of its
context)?  /Roger

P.S. Did the list definition change from two weeks ago, or am I just
going crazy?  I don't recall the previous version allowing simpleType as
a child of list.  Ah, it comes back to me.  The previous version
required the list facets to be collocated with list, not a child of
list.  I like the new version much better!
Received on Saturday, 23 September 2000 14:18:04 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:55:49 UTC