[topicmapmail] <mergeMap> Attributes?

Murray Altheim m.altheim@open.ac.uk
Fri, 27 Feb 2004 13:44:52 +0000


Jan Algermissen wrote:
> Hi,
> 
> I am working on ways to use XTM primarily as an exchange syntax for
> topic maps and I think I need additional attributes on the
> <mergeMap> element. This is *not* a proposal for changing XTM, but I
> would be really happy if the authors of the various TM engines
> could give me a hint if the XTM parsers would tolerate such
> new attributes?  Or if they even support plugin code for customizing
> the handling of <mergeMap>.
> 
> The background for my question is that I would like to (sometimes) use
> <mergeMap> 'as the engine of application state'[1] for the client application.
> In the same way as HTML <a href>'s do that in HTML.
> 
> A few initial thoughts on this are in [2], but a lot of this needs to be
> straightened out of course.
> 
> Thanks in advance.
> 
> Jan
> 
> 
> [1] http://www.ics.uci.edu/~fielding/pubs/dissertation/rest_arch_style.htm#sec_5_3_3
> [2] http://www.topicmapping.com/blog/more_on_xtm_as_engine_of_application_state.html

Jan,

I think Kal will correct me if I'm wrong, but my impression of
the existing <mergemap> functionality and what you're trying to
accomplish is that you don't need to suggest any changes to XTM
syntax. The <mergeMap> element is a directive, unlike an #include
or an SGML entity reference, it doesn't force the Topic Map engine
to immediately load the referenced Topic Map document -- it's up
to the application to do so at some appropriate time.

So in TM4J, there's an addMergeMap(Locator,Scope) method that adds
a directive to the list. You can use hasMergeMap(Locator) to
determine if a specific directive (via its Locator) exists, and
you can use getMergeMapLocators() to return a Java Collection
containing *unresolved* mergeMap directives.

So in your case, you only (at the application level, not at the
Topic Map engine level) resolve the mergeMaps when you want to,
such as when the user demands information from a specific map.

Murray

......................................................................
Murray Altheim                    http://kmi.open.ac.uk/people/murray/
Knowledge Media Institute
The Open University, Milton Keynes, Bucks, MK7 6AA, UK               .

   Now the Pentagon tells Bush: climate change will destroy us
   http://www.guardian.co.uk/climatechange/story/0,12374,1153530,00.html