TMQL - Proposal for a %base directive

Lars Heuer <[email protected]> Fri, 29 Apr 2011 13:41:43 +0200
Newsgroups gmane.text.xml.xtm.general
Organization Semagia
Message-ID <[email protected]>
Hi there,

A minor proposal for TMQL:

In tolog each identifier (and IRI) like foo is resolved against the
base IRI of the queried topic map. In the current TMQL draft (2008)
the resolution of identifiers is not specified, so I assume that IRIs
and identifiers are also resolved against the base IRI of the topic
map (if I understood it correctly, the tmql:ontology topics only jump
in if QNames should be resolved).

I find that behavior suboptimal for the following reasons:
* Topic maps do not have base IRIs
* I cannot re-use a parsed query with another topic map since the
  identifiers (and IRIs) have to be resolved relative to the current
  topic map

To cut the long story short, my proposal would be a base directive
like

   base-directive ::= '%base' iri
   iri            ::= CTM's def. for IRIs

If no base IRI is defined, the resolution of identifiers/IRIs may be
application dependent (c.f. RFC 3986 5.1.4.). If the base IRI
directive is used, it MUST be the first directive before any %prefix
directive. This proposal mimics the base IRI definition for SPARQL.

An alternative to the base IRI directive might be a more radical
"no-identifiers policy", so a query must only use absolute IRIs (and
QNames), since relative identifiers have a doubtful value anyway.

Best regards,
Lars
-- 
Semagia 
<http://www.semagia.com/>

<http://www.topicmaps.de/mailinglist/> German Topic Maps mailing list
<http://tinytim.sourceforge.net/> Open Source Topic Maps engine
<http://mappa.semagia.com/> Mappa - Python Topic Maps engine