[i] XPointer and addressing in OHP-Nav

From: Sigi Reich (sr_at_ecs.soton.ac.uk)
Date: Tue 07 Jul 1998 - 12:24:31 CDT



Hi there,

I have had a look at XPointer from an OHP-Nav point of view. The following includes a short summary and issues I thought are relevant to the OHSWG and therfore might be of interest to all of you:

Eve Maler and Steve DeRose are the editors of the XML Pointer Language (XPointer, all URLs see below). The XPointer specification has been influenced by HTML, HyTime and the TEI Guidelines. XPointer basically supports addressing into the internal structures of XML documents.

The relationship of Xpointer to XML and XLL (XLink) is that an XLLink can either be a URL (-> URI) or an XPointer. In particular, XPointers are to be used in conjunction with the URI structure, as fragment identifiers or queries, to specify a more precise sub-resource.

A simple example of an XPointer spec which demonstrates the basic syntax and usage (taken from http://www.ucc.ie/xml/): '...
For example, the word `XPointer' two paragraphs back could be referred to as http://www.ucc.ie/xml/faq.sgml#ID(faq-hypertext).CHILD(2,*).(6,*), meaning the sixth child object within the second child object after the element whose ID is faq-hypertext.
...'

where at some point in the source the markup reads '...<p><a href="#FAQ-HYPERTEXT">...'. The '*' in 'CHILD (2, *)' specifies any value, i.e. any element type.

Besides the 'child' primitive there are other primitives - many of which can be parametrized - and therefore, XPointer allows much more fancy addressing within documents than the current '#' in HTML. The well known '#' primitive can be directly mapped to XPointer via the 'html(NAME)' primitive (which could have been used in the example above to specify '#FAQ-HYPERTEXT'). As one can see from the example, XPointer uses two general types of primitives: * _absolute_ terms (such as root(), ID(), HTML()) and * _relative_ terms (such as child(), descendant(), ancestor(), preceding(), ...) to address data in relation to a given position (the 'root' of the document if nothing else is specified).

Spanning is done by using two XPointer specifications, e.g. id(a23).span(child(1), child(3)) which spans from the first to the third child of the element with an attribute ID whose value is 'a23'.

Issues with respect to OHP-Nav:

_(fwd link)_In summarising I would say that the XPointer spec will allow a much more advanced addressing in XML documents than the current '#' of HTML. The fact that it is limited to XML (and intended for textual data) means that OHP-Nav could perhaps borrow some of the ideas but that XML would probably not be suitable for OHP-Nav in its current form.

Sigi

Pointers on XPointer and related topics:
- Xpointer is available as

  http://www.w3.org/TR/WD-xptr
- Xlink is available as

  http://www.w3.org/TR/WD-xlink
- The XML FAQ

  http://www.ucc.ie/xml/
- The hypermail archive of the XML developer mailing list
  http://www.lists.ic.ac.uk/hypermail/xml-dev/
- IBM's XML parser with XPointer support
  http://www.alphaworks.ibm.com/formula/xml
- Links to the XPointer spec as a Java compiler-compiler source
  http://www.sil.org/sgml/bonhommeXpointer980417.html
- Sun's Parser Generator (A compiler compiler)
  http://www.sun.com/suntest/JavaCC/index.html



Sigi Reich, Research Fellow
Multimedia Research Group
Department of Electronics and Computer Science, Bldg. 16 University of Southampton, Southampton S017 1BJ, UK phone +44-1703 59 5415
fax +44-1703 59 2865
email sr_at_ecs.soton.ac.uk
www http://www.mmrg.ecs.soton.ac.uk/

This archive was generated by hypermail 2.1.5 : Tue 13 Aug 2002 - 07:20:59 CDT