The axesFlip path language is inspired by 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 axesFlip Designer.
Root definition
For each shape tree, the top-level container is considered its root element.
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 the root element of a shape tree.
/*
Selects all elements at the second level of a shape tree (direct children of the root).
/*/*
Selects all elements at the third level of a shape tree (children of second-level elements).
/Header
Selects all second-level elements named "Header" of a shape tree.
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 element.
Descendant selection
d:TableHeader
/d:TableHeader
Both expressions select all elements named "TableHeader" within a shape tree, that appear at the second level or deeper, meaning they are descendants of the root element.
/*/d:DataCell
Selects all "DataCell" elements that are nested within a shape tree 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 a shape tree, meaning it is a descendant of the 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 a shape tree, meaning it is a descendant of the root element.