[topicmapmail] Opera topic map question

Lars Heuer heuer at semagia.com
Wed Dec 5 09:11:06 EST 2007


Hi Alexander,

>> Actually, "instanceOf" and "type" are synonyms, as is quite easy to
>> see. The two statements
>> 
>>   - lmg's type is person, and
>>   - lmg is an instance of the person topic type
>> 
>> mean the same thing.

> Do you mean that the type element is actually the shortcut for the
> type-instance association and not the shortcut for the supertype-subtype
> association, as I wrongly assumed until now?

I am not sure to which "type" element you refer to. Topics do not have
a type-element.

The instanceOf is a shortcut for the type-instance association, not
for the supertype-subtype relationship.

<topic id="alexander">
   <instanceOf>
      <topicRef href="#person"/>
   </instanceOf>
</topic>

The <type/> element is only used within the <name/>, <occurrence/>,
<association/>, and <role/> elements. The topic produced by the
<type/> element is set to the property of the particular Topic Maps
construct since constructs != topics cannot play a role within an
association. Topics do not have a "type" or "types" property. You have
to model the type-instance (and supertype-subtype) relationship with
associations. In XTM you can either use the instanceOf-shortcut for
type-instance relationships or you use for each type-instance
relationship an explicit association.

The example above is equivalent to the following one:

<topic id="alexander">
</topic>

<association>
   <type>
     <topicRef href="http://psi.topicmaps.org/iso13250/model/type-instance"/>
   </type>
   <role>
     <type>
       <topicRef href="http://psi.topicmaps.org/iso13250/model/type"/>
     </type>
     <topicRef href="#person"/>
   </role>
   <role>
     <type>
       <topicRef
       href="http://psi.topicmaps.org/iso13250/model/instance/>
     </type>
     <topicRef href="#alexander"/>
   </role>
</association>

Best regards,
Lars
-- 
http://www.semagia.com
http://www.topicmaps.de/mailinglist/ German Topic Maps mailinglist



More information about the topicmapmail mailing list