[sc34wg3] CTM - Include directive

Lars Heuer heuer at semagia.com
Mon Jan 28 09:49:27 EST 2008


Hi all,

Comments against 0975 <http://www.itscj.ipsj.or.jp/sc34/open/0975.htm>

The "include" directive is discribed as "[...] the equivalent of
concatenation [...]".
This seems to be no problem at the first impression, but if you think
about it, I wonder if this is really the case.

Following scenario:
Topic map A <http://www.example.org/A>
Content:
"""
foo .
""""

Topic map B <http://www.example.org/B>
Content:
"""
%prefix <http://psi.example.org/>

bar .
"""

If I read the topic map A from the given IRI I get back at topic with
the item identifier
<http://www.example.org/A#foo>

If I read the topic map B from the given IRI I get back a topic with
the *subject* identifier
<http://psi.example.org/bar>

Let's create a topic map C, IRI: <http://www.example.org/C>
%include <http://www.example.org/A>
%include <http://www.example.org/B>

If I read C I get a topic map with the following topics:
- Topic with item identifier <http://www.example.org/C#foo> (from topic map A)
- Topic with subject identifier <http://psi.example.org/bar> (from topic map B)

You see, the interpretation of topic map "A" has changed. If I merge
topic map A and C, I get *3* topics, not only 2, since the
interpretation of the identifier "foo" has changed.

Let's create another topic map D, IRI: <http://www.example.org/D>
%include <http://www.example.org/B>
%include <http://www.example.org/A>

It's not very different from topic map C, only the include directives
where re-ordered.

Let's import topic map D:
You get the following topics:
- Topic with subject identifier <http://psi.example.org/bar> (from topic map B)
- Topic with *subject* identifier <http://psi.example.org/foo> (from
topic map A)

Wow! :) The interpretation of topic map A has changed again! Since
topic map B has defined a default prefix, the identifier "foo" is
interpreted as subject identifier.

If I merge A and D I get again *3* topics. But these topics aren't the
same as I got from the merging of A and C.

Is that intentional? So many interpretations for one and the same topic map?

Best regards,
Lars
-- 
mailto:heuer at semagia.com
http://www.semagia.com


More information about the sc34wg3 mailing list