What is this simpleType's "base" type?

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 UTC