[topicmapmail] Any semantic order to repeatable "or" groups of constructs in XTM?

Murray Altheim m.altheim@open.ac.uk
Thu, 20 Mar 2003 10:58:36 +0000


Kal Ahmed wrote:
> Hi Ken,
> 
> As you probably guessed, there are two answers to your question about
> whether ordering matters to the end user: Yes, and No ;-)
> 
> More precisely, if you are building an *XTM* authoring environment, then
> I think that you will find that ordering, comments etc. are important. A
> user working that closely with the syntax would not expect the
> application they are using to rearrange their content or to reorder it -
[...]
> If, on the other hand you are building a topic map authoring
> environment, the application should keep the author insulated from the
> syntax as much as possible. In this case, I think that it is valid for
> the authoring tool to deal with the syntax in anyway it sees fit -
[...]
> Of course, this is not a black-and-white division, there is an area of
> grey where it can be argued that some topic map creators might want the
> convenience of an authoring environment that hides the syntax along with
> the ability to round-trip their XTM syntax files without modification.
> In this case, I think that I would tend toward the former approach
> rather than the latter. 

As Kal knows, I've in the past week been incorporating the TM4J
topic map engine into my own application, which currently has a
topic map engine that I wrote, and which I've used to create PSI
sets from LTM source, as well as other features.

As Kal says, this isn't quite black and white, and I imagine much
more grey than either in most applications. Forinstance, if one is
authoring topic maps in XTM there are certain aspects of them that
regardless of "user insulation" needs maintaining within the engine.
One is order of the elements, another is preservations of ID values,
both for the purposes of a topic map's use as a PSI set and whenever
it may interact with other topic maps that are expecting to be able
to reference a topic via ID. While some may argue that all topic
map interaction should be done by subject- or name-based merging
(using the topic map's inherent paradigms), one must recognize that
there is Topic Maps and there is XML Topic Maps, the latter for
use in the application called the Web. In this case, being able to
reference things by ID is important.

To this effect, I've had to begin modifying the "common" way of
using TM4J to attempt to replicate the features of my engine that
preserved order and IDs. I also want to preserve comments, as
these include documentation, authoring and version information,
license, etc. and these are currently being stripped out from
the topic map upon being processed by TM4J. My own engine reads
in LTM and outputs all of its comments and topics in the order
of declaration. It inputs a consistent XTM and outputs an
identical XTM document, absent changes in whitespace. I've chosen
to use TM4J because I wasn't able to fix a number of merging
problems I encountered in my own engine (being no longer a
developer and trying to concentrate on developing the application
itself for my research -- time is valuable).

In short, while I sometimes hear within this community a certain
disparagement of XTM (for some I suppose, the child for some didn't
turn out the way mommy and daddy thought), being both an XML and a
Web application it incurs some of the baggage of both. And XTM
documents are also documents, not just topic maps. As documents
there are certainly aspects worth preserving, depending on how
the XTM document is to be used.

So Ken, yes, I do want roundtripping for much of my work, especially
the development of PSI sets, and as much as possible I try to
preserve the original LTM or XTM document's specific artifacts. I
didn't find this *that* difficult, merely maintaining a Vector of
the objects as they are parsed, and then re-writing them in that
order. Obviously there are limits to this, additions and deletions
of objects notwithstanding.

Murray

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

     "In Las Vegas Mr Gates also demonstrated a prototype
      fridge magnet which can be programmed to receive traffic
      reports, sports results and advertisements from local
      restaurants using the same FM signal as the wristwatch."
                                  -- The Guardian, 10 Jan 2003.