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

Robert Barta <[email protected]>
Newsgroups gmane.text.xml.xtm.general
Message-ID <[email protected]>
On Sat, Mar 05, 2011 at 12:44:37PM +0100, Robert Cerny wrote:

> > Pragmas have been _part_ of the language. For exactly the reasons you
> > pointed out.
> 

> Ok. After reading the relevant sections in the 'old' TMQL proposal,
> i understand, that the pragma is only valid for one query and that
> there is no distinction between direct and transitive.

Yup.

> If i would
> wildly guess, i would say, because you think, that it *is* the same
> axis, so why give it a different name, thus also the necessity to
> specify the direction. This is a very consequent and clear
> approach.

Probably :-)

> Yet, when i wrote, down some queries a while ago this way, i was
> always unsure whether to use '<<' or '>>'. It was always a matter of
> trial and error. I had the same problem when reading queries.

That is a valid concern, albeit not in all cases:

    $t >> supertypes

is rather self-evident. OTOH,

    $a << types

will make you think for a second, or two. For _exactly_ that reason, 
a beautiful editor proposed a shortcut notation for these occasions:

    $a >> instances # which is the same as $a << types

I wonder what the alternative would be? Name not only the axes
differenly, but also every direction? With role types and variants we
would end up with ~30?

> wonder how this discrepancy comes about: on the abstract level, it
> makes so much sense, but on when applied, it is so difficult. But is
> my guess correct, that certain (if not all) 'old' TMQL path
> expressions can be understood no matter whether you start at the
> left or the right?

Yes, the linear way to express a filtering constraint over a
collection allows to be read l->r and l<-r.

\rho
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.