Re: TMQL - Proposal: Removal of reifier axis
"Andrew S. Townley" <[email protected]> Sat, 30 Apr 2011 12:25:58 +0100
| Newsgroups | gmane.text.xml.xtm.general |
|---|---|
| Message-ID | <[email protected]> |
Hi Lars, On 30 Apr 2011, at 11:46 AM, Lars Heuer wrote: > Hi Andrew, > > [...] >> Minor syntax clarification here. I didn't think the splat was a >> valid part of the 2008 draft. > > Yes, the 3rd expression wasn't meant to be valid TMQL acc. to the > drafr 2008, but an imaginary XSLT-like syntax to remove some >> > clutter. Gotcha. One of the things I've been toying with is allowing axes to be used interchangeably with anchors in path expressions. I haven't fully explored this since my TMQL activities have been put on hold to focus on generating some revenue, but it would at least not require the >> step, giving: // tmdm:association / characteristics [ . isa tmdm:topic-name ] I'm not sure this isn't just aesthetics though since it's almost the same as (ignoring the fact that TMDM associations don't have names): // tmdm:association >> characteristics tmdm:topic-name One key difference is that since my parser effectively converts everything to path expressions, it means that resolution of "characteristics" the identifier would be deferred to the map implementation (or at least the query engine) instead of being handled at the syntax layer. The above is one possible translation of an axes into a path step, but it might not be the only one. An advantage of using axis names vs. splat is that it's clear you're requesting TMDM (or other, dynamically defined) axes rather than what I would interpret as more literal, implementation-dependent handling of the splat wildcard (however, as I re-read this, it might be a false distinction). The interpretation of the anchor definition of the spec would then be dynamic, but I think that's ok, at least as far as my thinking's been allowed to go the last time I was seriously working on this stuff. >> To use the path expression in the >> latter case, I would've done this: > >> //tmdm:association [ . isa tmdm:topic-name ] > > I think this expression is different from mine, since you're saying > here: Give me all associations which are also an instance of > tmdm:topic-name. > > You have to insert an additional axis to perform the [. isa > tmdm:topic-name] test and to match my purpose. > > Your path expression is valid, but it does not iterate through the > children of the association and test if the child is an instance of > tmdm:topic-name. Correct. Human translation/interpretation error on my part. :) Cheers, ast -- Andrew S. Townley <[email protected]> http://atownley.org