logo
Introduction < XTMPath, Manipulating Topic Map Data Structures < < Home 

prevUpNext

Introduction

One of the problems we encountered in developing applications based on XTM::base is that one needs a thorough understanding of the data structures to do even the simplest accesses and manipulations. While XTM::base does its best to abstract away internal representation, the deeply nested data structures provide a high entrance barrier for a casual programmer with basic Topic Map know-how. Things really get cross once the map is not only queried and traversed, but also modified or even extended.

In the following we want to demonstrate how the tasks of navigating and localizing Topic Map information can be simplified with XTMPath. XTMPath is a specialization of XPath allowing a declarative way to specify in what particular information a developer is interested. XTMPath is insofar a specialization as

  • XTMPath is not working on a DOM or DOM-like data structure (an internal Topic Map may look significantly different from its XTM representation, it might not even be a tree),
  • XTMPath is therefore operating on a merged version of a map, which implies that no assumptions can be made about any ordering,
  • XTMPath can make use of knowledge about the structure, as given by the XTM DTD,
  • XTMPath is used within a fully-fledged programming language, there is no need to mimick functions like list management and selection in XTMPath, which are already provided by the programming language.

Another use of XTMPath is to create Topic Map data structures, say, associations and topics. This extends the familiar XPath approach one step further. But first, we look at the problem of localizing information.