ZVON > Tutorials > XPointer Tutorial
>> Example 3 / 3 << | Prev | Next |
Contents > XPointer Framework > XPointer forms

XPointer forms

XPointer can use two forms: shorthand or scheme-based form.

Shorthand form relies on ID mechanism - the application needs to determine the element by the value of its ID-attribute or ID-element.

XPointer:b1

<!DOCTYPE   AAA
[
<!ELEMENT   AAA   (BBB+)>
<!ELEMENT   BBB   EMPTY>
<!ATTLIST   BBB
                              id   ID   #REQUIRED>
]
>

<AAA>
   <BBB   id="b1"/>
   <BBB   id="b2"/>
</AAA>

Scheme-based forms represent various mechanisms for matching parts of the document. This example shows the use of the "element()" scheme.

XPointer:element(/1/1)

<AAA>
   <BBB   id="b1"/>
   <BBB   id="b2"/>
</AAA>