[tmql-wg] TMQL names vs. occurrences

Robert Barta rho at bigpond.net.au
Fri Dec 8 18:28:48 EST 2006

On Tue, Dec 05, 2006 at 03:28:35PM +0100, Lars Heuer wrote:
> I can answer my question, I think, partially myself :)


> If I am not mistaken, the correct query to query for all surnames
> would be:
>       select $p/names[* surname] where $p isa person

Something like this, yes. If you do a

  select $p / name

then a TMQL processor is supposed to look for a characteristic (= name
_or_ occurrence) of type 'name'.

Now 'name' is a predefined topic (either in TMDM, TMRM or TMQL), not a
keyword, so it is something like tmdm:name. This allows also to say

  select $p / homepage


Up to this point there is NO distinction between names and occurrences.
If someone had written in his map

   homepage iko name

   rho isa person
   homepage: the one dancing on tables

then this is a name. In

   rho isa person
   homepage: the one dancing on tables

'homepage' may default to a "specialization of an occurrence", so

   homepage iko occurrence

is implicit. All this implies, that a user may also do both:

   homepage iko name

   homepage iko occurrence

Topic Maps do not have the concept of disjunct types. Unlike OWL.


> But the question with the occurrences vs. names remains
>      select $p/surname where $p isa person
> Contains the result (atomified) occurrences and names or just
> occurrences? If the result contains both, and I want just names, would
> this be possible:
>      select $p/surname[* tmdm:name] where $p isa person


If someone is concerned about any ambiguity in his data (read: "I want
_names_ only"), then additional filtering will have to be introduced:

   select $p / homepage [ * name ]

But I do not expect that this is the main stream case. Normally most
notations will encourage that occurrences and names have distinct type


Saying that, a topic map

   rho isa person
   ! surname: Barta        # or whatever the syntax now is for a name

will implicitly create

   surname iko name

and the following queries will do what is expected:

   select $p / surname        # only get the surname(s)

   select $p / name           # get all names, also surnames


More information about the tmql-wg mailing list