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

"Andrew S. Townley" <[email protected]>
Newsgroups gmane.text.xml.xtm.general
Message-ID <[email protected]>
On 5 Mar 2011, at 12:15 PM, Robert Cerny wrote:

> Am 05.03.2011 um 00:30 schrieb Benjamin Bock:
> 
>>>       s1 // types for all types,
>>> 
>>>       s1 / types for direct types
>>> 
>> 
>> That didn't fit my initial mental model but maybe it's a good idea.
>> I'll at that to my think-about-it list. Thanks.
> 
> Just for the records: When writing '//types', i feel like something is missing between the two slashes (also in XPATH). I prefer Andrew's first proposal '/*types' for 'all types', because the star has the connotation of 'deep' or 'transitive' for me. Yet, i find the current proposal '/types' for 'all types' and the less frequent (so longer is ok) '/direct-types' for direct types, very good.

To be fair, I think it was Patrick who suggested it first.

Here we're back to aesthetics vs. functionality.  I like the '//' better because I know and have wrestled with XPath a good bit and it kinda means the same type of thing.  Reusing norms and precedents from the wild where possible is a good thing! :)

I could live with '/*' but I'd still separate them with whitespace either way (because that's just the kinda guy I am...).  The only time I've ever encountered '/*' is as the start of a C style comment, and that would be the first thing I'd think of.

I actually wouldn't care as long as I could be able to specify both modes in the same query, e.g. something like:

	select $x where ($x // types) - ($x / types) => bag of all types for $x which aren't explicit types

Of course, I'd also then expect to be able to do t / ROLE and t // ROLE for arbitrary roles as well.  I think that kind of thing's already supported in the proposals though (must check....)

ast
--
Andrew S. Townley <[email protected]>
http://atownley.org
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.