DPATH
DPATH is introduced in this context as a means of addressing elements in a
document with a flat structure. It has some resemblance with xpath, but is much simpler and
has less precision.
The basic structure in an DPATH-expression is best considered as an
analogy to a unix filepath.
Some examples:
//Results |
Will select all material under heading-level 3 with name Results |
* |
Will attempt to select all material under headings level 1 |
/Semifinal/Results |
Will select all material under heading-level 3 with name Results which are under header-level 2 with name Semifinal |
We may also have a spesification part, or selection part, in the form [].
The purpose is to filter the elements we use.
- [*] will have no filtering
effect, all elements will be included.
- [p,img] wil select only elements of type p and img.
//Results[*] |
Will select all material under heading-level 3 with name Results |
//Results[table] |
Will select all elements of type table under heading-level 3 with name Results |