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

"Costello, Roger L." <[email protected]>
Newsgroups gmane.text.xml.schema.devel
Message-ID <[email protected]>
Hi Folks,

Perhaps "parent" simpleType is the appropriate term?  

In my LotteryNumbers example, would it be appropriate to say that the OneToNintyNine simpleType is the "parent" simpleType of LotteryNumbers?

/Roger

-----Original Message-----
From: Costello, Roger L. 
Sent: Saturday, June 18, 2011 6:29 AM
To: [email protected]
Subject: RE: What is this simpleType's "base" type?

Thanks again Mukul and Michael.

There must be an appropriate name for "Named simpleType A depends on named simpleType B"

That is, ignoring the details of A, at a macro level simpleType A directly depends on another named simpleType called B. It is useful to identity the sequence of dependent named simpleTypes.

Perhaps, get-named-dependent-type(...)

What do you think about that?

/Roger


-----Original Message-----
From: Mukul Gandhi [mailto:[email protected]] 
Sent: Saturday, June 18, 2011 5:14 AM
To: Costello, Roger L.
Cc: [email protected]
Subject: Re: What is this simpleType's "base" type?

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.