/docs/MyDocs

To get this branch, use:
bzr branch http://darksoft.org/webbzr/docs/MyDocs

« back to all changes in this revision

Viewing changes to xml/info/XPointer.txt

  • Committer: Suren A. Chilingaryan
  • Date: 2009-04-09 03:21:08 UTC
  • Revision ID: csa@dside.dyndns.org-20090409032108-w4edamdh4adrgdu3
import

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 Extension of XPath suited for linking
 
2
 
 
3
 
 
4
Functions
 
5
---------
 
6
 point()                selects the set of points of a node
 
7
 here()                 - get location of the element containing current 
 
8
                        XPointer
 
9
 origin()               - get location where user initiated link traversal
 
10
 start-point(location-set) - get start point of location set
 
11
 string-range(XPath)    - find matching substring
 
12
 range-to(XPointer)     - see examples
 
13
 
 
14
 
 
15
Samples
 
16
-------
 
17
 
 
18
0.                                 URI
 
19
   -----------------------------------------------------------------
 
20
  /                                                                 \
 
21
  http://www.foo.org/bar.xml#xpointer(article/section[position()<=5])
 
22
                            |         \                            /|
 
23
                            |          ---------------------------- |
 
24
                             \              XPointer expression    /
 
25
                              \                                   /
 
26
                               -----------------------------------
 
27
                                  XPointer fragment identifier
 
28
 
 
29
 
 
30
 
 
31
 Points to the first five section elements in the article root element
 
32
 
 
33
 
 
34
 
 
35
1. /descendant::text()/point()[position()=0]
 
36
 
 
37
 Selects the locations right before the first character of all character data
 
38
 nodes in the document. 
 
39
 
 
40
 
 
41
2. /section[1] / range-to(/section[3])
 
42
  
 
43
 Selects everything from the beginning of the first section to the end of the 
 
44
 third.
 
45
 
 
46