[topicmapmail] Stupid question---thanks

W. Eliot Kimber eliot@isogen.com
Mon, 02 Sep 2002 08:57:18 -0500


Jan Algermissen wrote:
> 
> Suellen Stringer-Hye wrote:

 [...]

> > </topicMap>
> >
> > A couple of notes on the above:
> 
> ..you might want to include your notes in the map as
> resourceData elements, such as
> 
> <topic id="record">
>    <baseName>
>      <baseNameString>Record</baseNameString>
>    </baseName>
>     <occurrence>
>       <instanceOf>
>         <topicRef xlink:href="#note" />
>       </instanceOf>
>       <resourceData>
>        The records in the database are pointers to web resources
>        maintained internationally
>       </resourceData>
>    </occurrence>
> </topic>

I'm not sure this is, rhetorically, a good use of occurrence--that is,
in what sense is this (semantic) comment an occurrence of the topic
"record"? I would either maintain this information outside the scope of
the topic map or associate it using a "annotation" association w/in the
topic map. But my initial instinct is that this type of note is not part
of the topic map itself (not part of the "knowledge" represented by the
topic map) but is a metacomment about the topic map, and therefore
should not itself be part of the topic map. 

Because topicMap elements need not be the root elements of the documents
that contain them, it is easy to have a single document instance that
has both XTM elements and (outside the scope of any topicMap elements),
other elements. This can be used both to avoid restrictions on
resourceData and do additional application-specific stuff (such as
annotating topic map constructions w/o using topic map constructs). For
example, you might do this:

<?xml version="1.0"?>
<myTopicmapCollection 
  xmlns:xtm="http://topicmaps.org/...."
  xmlns:xhtm="http://w3.org/TR/xhtml....">
<!-- here you could have all sorts of metadata that describes this
document in a way
     that you cannot annotate a bare topicMap document. -->
  <docMetaData>
    <author>W. Eliot Kimber, eliot@isogen.com</author>
    <copyright>...</copyright>
    <date.created>2002-09-02</date.created>
  </docMetaData>
  <topicMaps>
    <xtm:topicMap>
      <xtm:topic id="topic-01">
       <xtm:occurrence>
         <xtm:resourceRef xlink:href="xpointer(//*[@id='desc-01'])"/>
       </xtm:occurrence>
      </xtm:topic>
    </xtm:topicMap>
  </topicMaps>
  <topicDescriptions>
    <description id="desc-01">
      <xhtm:p>This is the description of topic 'topic-01'</xhtm:p>
      <xhtm:p>This is the second paragraph of the description, something
you can't
do in resourceData.</xhtm:p>
    </description>   
  </topicDescriptions>
  <topicNotes>
    <note xlink:href="xpointer(//*[@id='topic-01'])">
     <xhtm:p>The records in the database are pointers to web resources
maintained internationally</xhtm:p>
    </note>
  </topicNotes>
</myTopicMapCollection>

Note that any XTM processor that cannot correctly handle this document
(as far as finding the topicMap and ignoring the rest goes) cannot claim
to be a conforming XTM processor.

[Metacomment: why am I not using bare names in my hrefs? Because without
a DTD the pointers should *FAIL* to be resolved because bare pointers in
XPointers are equivalent to "id()", which only works if there's a DTD.
There is no DTD for this document. Therefore I must use the full
XPointer syntax.]

Cheers,

Eliot
-- 
W. Eliot Kimber, eliot@isogen.com
Consultant, ISOGEN International

1016 La Posada Dr., Suite 240
Austin, TX  78752 Phone: 512.656.4139