Re: What is this simpleType's "base" type?

Mukul Gandhi <[email protected]>
Newsgroups gmane.text.xml.schema.devel
Message-ID <[email protected]>
The point which Mike answered is correct I believe.

For other ones, I'll have a take on them.

On Sat, Jun 18, 2011 at 3:40 AM, Costello, Roger L. <[email protected]> wrote:

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

The other one is itemType of the list (the list type is the "base"
type you've mentioned above).

> 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?

I think the commonly used term to express "xxx" here is simply base
type. So you may name xxx here as base-type probably.

or perhaps,
getType(LotteryNumbers, "base")

could say that retrieve the base type of the type LotteryNumbers.

> 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?

I think this may be better done with two function calls, for e.g,

getItemType(getType(LotteryNumbers, "base"))

this may return the itemType of list, if that is the case or null otherwise.




-- 
Regards,
Mukul Gandhi
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.