list attribute - type or itemType

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"/>
    </simpleType>

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
thinking:

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

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