1 | | == Pointers and links |
2 | | |
3 | | === XLink === |
4 | | See [http://www.w3.org/TR/xlink/ XML Linking Language (XLink) Version 1.0]. |
5 | | |
6 | | Each element could use the XLink attributes for example: |
7 | | * <p>The best german punk band is <div xlink:href="http://slime.de/">Slime</div>.</p> |
8 | | |
9 | | === XPointer === |
10 | | See [http://www.w3.org/TR/xptr-framework/ XML Pointer Language (XPointer)]. XPointer could be used in URI's such as provided by XLink. |
11 | | |
12 | | Examples: |
13 | | |
14 | | * <p>This is discussed in <div xlink:href="example.xml#xpointer((//p)[1])">the first paragraph of the example document</div>.</p> |
15 | | * <p>This is discussed in <div xlink:href="example.xml#xpointer(id('4711')/div[1])">the first division of the example document</div>.</p> |
16 | | * <p>This is discussed in <div xlink:href="example.xml#element(/1/2)">the second element of the first element</div>.</p> |
17 | | * <p>Einstein said in his diary that he doesn't like a further delay of his shipping tour to south america (see <note xlink:href="http://mpdl.mpiwg-berlin.mpg.de/physics/einstein/diary.xml#xpointer((id('page53')/echo[1]/text[1]/body[1]/chap[1]/p[1]/s[2])">page 53, sentence 2</note>).</p> |
18 | | |
19 | | ==== XPoints ==== |
20 | | |
21 | | [[Image(xpoint.png)]] |
22 | | |
23 | | * Examples |
24 | | * point(1.0) is just inside the beginning of the p element. |
25 | | * point(1.2) is between the end of the em element and the following text node (which contains "world."). |
26 | | * point(.0) immediately precedes the root node. |
27 | | * point(1/2/1.1) immediately following the "b" in the middle text node. |
28 | | |
29 | | ==== Range ==== |
30 | | * xpointer(id("chap1")/range-to(id("chap2"))) (the range from the start point of the element with ID "chap1" to the end point of the element with ID "chap2") |
31 | | * string-range(//title,"Thomas Pynchon")[17] (the 17th of those "Thomas Pynchon" strings appearing in a title element) |
32 | | * <p>See the <note xlink:href="http://mpdl.mpiwg-berlin.mpg.de/physics/einstein/diary.xml#xpointer((id('page53')/echo[1]/text[1]/body[1]/chap[1]/p[1]/s[2]/range(1.3, 1.10))">text passage on page 53, sentence 2, character 3 to 10</note>).</p> |
33 | | |
34 | | |