W3C home > Mailing lists > Public > xmlschema-dev@w3.org > June 2011

What is this simpleType's "base" type?

From: Costello, Roger L. <costello@mitre.org>
Date: Fri, 17 Jun 2011 18:10:02 -0400
To: "xmlschema-dev@w3.org" <xmlschema-dev@w3.org>
Message-ID: <9E51F88D5247B648908850C35A3BBB500599AB3B42@IMCMBX3.MITRE.ORG>
Hi Folks,

This simpleType, LotteryNumbers, specifies a list of exactly 6 OneToNintyNine values:

    <xsd:simpleType name="LotteryNumbers">
        <xsd:restriction>
            <xsd:simpleType>
                <xsd:list itemType="OneToNinetyNine"/>
            </xsd:simpleType>
            <xsd:length value="6"/>
        </xsd:restriction>
    </xsd:simpleType>
    
Here is the OneToNintyNine simpleType:

    <xsd:simpleType name="OneToNinetyNine">
        <xsd:restriction base="xsd:positiveInteger">
            <xsd:maxInclusive value="99"/>
        </xsd:restriction>
    </xsd:simpleType>

Consider again the LotteryNumbers simpleType. What is its "base" type? Is it the (anonymous) list type:

            <xsd:simpleType>
                <xsd:list itemType="OneToNinetyNine"/>
            </xsd:simpleType>

Or, is it OneToNintyNine?

If there is a function, get-base-type(), what would you expect this call to return:

    get-base-type(LotteryNumbers)

The list type or OneToNintyNine?

If one is the "base" type then what is the other?

What would you name a function that, given LotteryNumbers, returns the list type?

     get-xxx(LotteryNumbers) returns

            <xsd:simpleType>
                <xsd:list itemType="OneToNinetyNine"/>
            </xsd:simpleType>

What name would you replace xxx with?

What would you name a function that, given LotteryNumbers, returns OneToNinetyNine?

     get-yyy(LotteryNumbers) returns

    <xsd:simpleType name="OneToNinetyNine">
        <xsd:restriction base="xsd:positiveInteger">
            <xsd:maxInclusive value="99"/>
        </xsd:restriction>
    </xsd:simpleType>

What name would you replace yyy with?

/Roger
Received on Friday, 17 June 2011 22:10:41 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 17 June 2011 22:10:43 GMT