Each Location Path has the following structure:
Step1 / Step2 / ... / StepN
Those Location Paths specifying the search of attributes are called
Attribute Location Paths.
In them, the steps from Step1
to StepN-1
are also Element Location Steps. However, the last step must be an
Attribute Location Step (see below).
Each Element Location Step may have the following structure:
axis :: ETs [filter]
axis
Axis | Description |
child |
Includes children of the step's context node. This axis is used by default
(i.e. when no axis:: prefix is specified at the location step).
|
self |
Includes only the step's context node itself |
child-or-self |
Includes the step's context node and all its children |
descendant |
Includes all descendants of the step's context node (i.e. its children, children of the children and so on) |
descendant-or-self |
Includes the step's context node and all its descendants |
attribute^ |
This is the link-axis, which is an extension of XPath introduced in FlexDoc.
It contains those elements of the whole DSM (Data Source Model) whose IDs (unique identifiers)
are the values of the specified attribute of the step's context node.
See Also: |
{ expr } |
This axis, called formula-axis, is another extension of XPath introduced
in FlexDoc. It covers functionally all other axes and is, probably,
the ultimate axis imaginable.
The elements included in that axis are produced by the FlexQuery expression specified between the curly brackets. The expression should return the enumeration of new elements, which it may produce from the step's context node (the element) passed to the expression as the generator context element. For example, the step:
Note: The expression specified in formula-axis should always return the
The returned enumeration should contain objects of
The |
ETs
(ET1 | ET1 | ... | ETn)
ETn
is an Element Type name.
*
), which will include all elements regardless of their type
filter
When specified this subquery is executed for each element to be included in the step's result set.
An element is included in the result set only when the subquery returns true
.
The tested element is accessible within the subquery as the generator context element
(via the contextElement
variable).
The previous context element is overshadowed (it is restored again after the Location Path
processing is finished).
Note: The filtering subquery is compiled dynamically within the implementation of this function. Thus, there is no way to check it before execution. Syntax errors within the subquery will cause an exception during the processing of the Location Path.
@attribute
attribute
is the name of the searched attribute.
The Attribute Location Paths are normally used to collect values of
the same attribute by a number of elements at once.
Compound Location Paths
You may join several Location Paths using '|' separator into a single expression:
lpath1 | lpath2 | ... | lpathN