Concrete examples in XPointer specification

I am reading the XPointer specification. There are several sections where a
concrete example of XPointer code might help to better understand the
described concept. For example, in the definition of node-point and
character-point it is mentioned the so called index. It is not clear,
however, how the container node and the index should be provided. For
example, in

<p>This is a <em>very short</em> paragraph</p>

we have that the container node p has three child nodes: a text node, an em
node, and another text node. The node-point with container node p and index
0 should corrispond to the location before all child nodes. How do I write
that in XPointer?

#xpointer(p)
#xpointer(p/0)
????

How do I specify the node-point between the em node and the second text
node?

#xpointer(p/em)
#xpointer(p/2)
????

How do I specify the character point between "para" and "graph" ?

#xpointer(p/child::text()[2]/4)
#xpointer(p/child::text()[2]/point(4))
????

How should I use point() and range() functions? Really some more example
might significantly help readers.

P.S.

I do not understand the

#xpointer( expr to expr )

syntax. It makes no sense to use a "to" in a function. It would be better
to have

#xpointer( expr/to(expr) )

Dr. Dario de Judicibus - IBM Global Services
EMEA Knowledge Management Consulting Group

[WORK] tel: +39.06.5966.2531, fax: +39.06.5966.5432, e-mail:
dejudicibus@it.ibm.com
[HOME] fax: +39.06.2331.2293, e-mail: dejudicibus@geocities.com, icq:
25257587
[SITES] http://www.geocities.com/~dejudicibus/,
http://www.geocities.com/~dejudicibus/gallery/,
http://members.xoom.com/dizi/

Received on Tuesday, 9 May 2000 10:01:43 UTC