Using Ranges
-
String ranges
String ranges let you specify string values inside of contexts you define. For example, to reference the word 'Points' in this presentation, you could write
string-range(//slides/slide[7]/title, "Points")
. For all of the occurrences of the word 'you' in this paragraph, you could write string-range(//slides/slide[7]/item[1]/body, "you")
. For all occurrences of 'you' in this document, it would be the simpler string-range(/, "you")
-
Ranges between locations
You can define a range between two locations - nodes, points, or ranges - with the
range-to
function. You might, for example connect the space between two elements with the ID values "start" and "end" using (id("start")/range-to(id("end")))
. The range includes the entire content of both the start and end locations, if any.
-
Ranges inside nodes
To identify a range between two points without including those points, use the
range-inside
function. You might, for example reference the space between two elements with the ID values "start" and "end" using (id("start")/range-inside(id("end")))
.
-
More functions
The
here
and origin
functions let you establish XPointers relative to the current node or the origin of the link, respectively. The ranges
function lets you convert nodes into ranges.
Previous Page <
TOC
> Next Page