Re: TMQL: Direct (super|sub)types?

Lars Marius Garshol <[email protected]>
Newsgroups gmane.text.xml.xtm.general
Message-ID <[email protected]>
* Patrick Durusau
> 
> I assume from what has been said that an "indirect" type would be:
> 
>> Consider a type hierarchy like:
>> 
>>   - organization
>>     - company
>                 - division
>>     - foundation
>> 
> Yes?

Yes. (Although a division is not a company, so ontologically this is wrong. But structurally you are right.)

> Err, isn't "always returns also indirect subtypes" an implementation choice that has to be "fixed" by "direct-subtype?"

Yes.

> Ah, it is a question of what is the default?

Yes. There is general consensus that the default should be to include the full transitive closure, that is, if you ask for subclasses of organization you should also get 'division'.

> In other words, "sub-type organization" could by *default* return
> 
> company,
> 
> or
> 
> company, division, and foundation.

Almost. Your first alternative is missing foundation, I assume by oversight.

> If the "default" is only company, then need something like sub-type * organization, to return all the subtypes of organization.

Yes.

> I would be in favor of the wildcard operator since that is an explicit choice to take the hit on getting all the subtypes (I am sure this will come up in other cases as well) and it leaves a well-defined default if the wildcard is not specified.

That's one way to do it. At the moment these are different axes without a surface syntax to distinguish between them, but different choices could be made.

--Lars M.
http://www.garshol.priv.no/tmphoto/
http://www.garshol.priv.no/blog/
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.