1 | | == Simple pointers and links: within a document by Id attribute == |
| 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. Examples: |
| 11 | |
| 12 | * <p>This is discussed in <div xlink:href="example.xml#xpointer((//p)[1])">the first paragraph of the example document</div>.</p> |
| 13 | * <p>This is discussed in <div xlink:href="example.xml#xpointer(id('4711')/div[1])">the first division of the example document</div>.</p> |
| 14 | |
| 15 | ==== XPoints ==== |
| 16 | |
| 17 | [[Image(xpoint.png)]] |
| 18 | |
| 19 | * Examples |
| 20 | * point(1.0) is just inside the beginning of the p element. |
| 21 | * point(1.2) is between the end of the em element and the following text node (which contains "world."). |
| 22 | * point(.0) immediately precedes the root node. |
| 23 | * point(1/2/1.1) immediately following the "b" in the middle text node. |
| 24 | |
| 25 | ==== Range ==== |
| 26 | * 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") |
| 27 | * string-range(//title,"Thomas Pynchon")[17] (the 17th of those "Thomas Pynchon" strings appearing in a title element) |
| 28 | * ... |
| 29 | |
| 30 | |
| 31 | === TEI: Elements for simple pointers and links === |