[tmql-wg] TMQL names vs. occurrences

Lars Heuer heuer at semagia.com
Tue Dec 5 09:28:35 EST 2006

I can answer my question, I think, partially myself :)


> This query:

>     select $p /names where $p isa person

> returns all names of all topics which are an instance of person. But how
> can the user specify that she only wants the surnames?

If I am not mistaken, the correct query to query for all surnames
would be:

      select $p/names[* surname] where $p isa person

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

(which is equivalent with

      select $p/names[* surname] where $p isa person

Best regards,

More information about the tmql-wg mailing list