Re: Concrete examples in XPointer specification

This is a fair suggestion...  We've been discussing how to get more 
examples in.  We might be able to add a few more for CR, but failing that, 
we're planning to collect examples and put them on a public Linking Group 
web site.

         Eve

At 03:56 PM 5/9/00 +0200, dejudicibus@it.ibm.com wrote:


>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) )

--
Eve Maler                                    +1 781 442 3190
Sun Microsystems XML Technology Center    elm @ east.sun.com

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