The axesFlip path language is based on XPath and follows similar principles for navigating and selecting elements within a hierarchical tree structure. Use path language to navigate the tree structure of shape trees and select specific elements.
This path language can be used wherever a Selector is available in the axesFlip Designer. Any node type that exposes a Selector field in its Node Properties supports path language expressions. Common examples include:
- Node Selector
- Line Selector
- Column Structure Selector
- Row Structure Selector
Among these, the Node Selector is the most commonly used and is especially prevalent in Tagging nodes, where it determines which shape tree elements are matched and processed.
Root definition
A node may contain multiple shape trees. For each shape tree, the top-level container is considered its root element. Consequently, if a node contains more than one shape tree, there are multiple root elements—one for each shape tree.
Core selectors
| Syntax | Description |
|---|---|
/ |
Used to navigate the tree structure. It separates steps in a path expression and defines hierarchical relationships between elements. |
* |
Wildcard that matches any element. |
name |
Selects elements by name (e.g., Header). |
Relationship specifiers
Define how elements relate to each other in the structure.
| Syntax | Relationship | Description |
|---|---|---|
s: |
Self | Refers to the current element itself. |
c: |
Children | Selects direct children of the current element. |
d: |
Descendants | Selects all nested elements under the current element. |
p: |
Parent | Selects the immediate parent of the current element. |
a: |
Ancestors | Selects all ancestors up to the root. |
ps: |
Preceding Siblings | Selects siblings that appear before the current element. |
fs: |
Following Siblings | Selects siblings that appear after the current element. |
pr: |
Preceding | Selects all elements that appear before the current element in document order. |
fl: |
Following | Selects all elements that appear after the current element in document order. |
Examples
Basic navigation
/
Selects all root elements of the shape trees.
/*
Selects all elements at the second level of the shape trees (direct children of the root).
/*/*
Selects all elements at the third level of the shape trees (children of second-level elements).
/Header
Selects all second-level elements named "Header".
Named paths
/s:Heading1
Selects all first-level elements named "Heading1".
/Footer/*
Selects all third-level elements nested inside a second-level element named "Footer".
/Table/TableRow/DataCell
Selects all "DataCell" elements that are children of "TableRow" elements, which themselves are children of the second-level element "Table", starting from the root elements.
Descendant selection
d:TableHeader
/d:TableHeader
Both expressions select all elements named "TableHeader" within the shape trees, that appear at the second level or deeper, meaning they are descendants of root elements.
/*/d:DataCell
Selects all "DataCell" elements that are nested within the shape trees at the third level or deeper, regardless of their immediate parent.
Combined usage
/s:Body/d:Paragraph
Selects all "Paragraph" elements anywhere within first-level elements named "Body", regardless of nesting depth.
/s:TableRow/HeaderCell/fs:DataCell
From each second-level element named "HeaderCell" within first-level elements named "TableRow", selects all following sibling "DataCell" elements at the same level.
d:ListItem/c:Paragraph
Selects all elements named "Paragraph" that are direct children of any element named "ListItem", where the "ListItem" appears at the second level or deeper within the shape trees, meaning it is a descendant of a root element.
d:Paragraph/p:Caption
Selects all elements named "Caption" that are the immediate parent of any element named "Paragraph", where the "Paragraph" appears at the second level or deeper within the shape trees, meaning it is a descendant of a root element.