Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
16.76. Advanced Input Path Examples
| Input Path | Description |
|---|---|
| /a/(b|c|d) | Match children of the top level node "a" that are named "b", "c" or "d". None of the nodes may have same-name-sibling indexes. |
| /a/b[c/d] | Match node "b" child of the top level node "a", when node "b" has a child named "c", and "c" has a child named "d". Node "b" is the selected node, while nodes "c" and "d" are used as criteria but are not selected. |
| /a(/(b|c|d|)/e)[f/g/@something] | Match node "/a/b/e", "/a/c/e", "/a/d/e", or "/a/e" when they also have a child "f" that itself has a child "g" with property "something". None of the nodes may have same-name-sibling indexes. |
These examples show a few more advanced rules. Parentheses (i.e., '
(' and ')') can be used to define a set of options for names, as shown in the first and third rules. Whatever part of the selected node's path appears between the parentheses is captured for use within the output path. Thus, the first input path in the previous table would match node "/a/b", and "b" would be captured and could be used within the output path using "$1", where the number used in the output path identifies the parentheses.
Square brackets can also be used to specify criteria on a node's properties or children. Whatever appears in between the square brackets does not appear in the selected node.