What is this simpleType's "base" type?

"Costello, Roger L." <[email protected]>
Newsgroups gmane.text.xml.schema.devel
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.