all child elements
all child elements
Immediate child with position pos, should only be an element.
Immediate child with position pos, should only be an element. NOTE this will always be evaluated in place and is 1 indexed
Search for all immediate child elements matching the predicate
Search for all immediate child elements matching the predicate
Search for all immediate child elements with a matching qname
Search for all immediate child elements with a matching qname
Search for all immediate child elements with a matching local name only
Search for all immediate child elements with a matching local name only
Only matches local name
Only matches local name
Loose match for UnprefixedQNames only, only matches local and namespace
Loose match for UnprefixedQNames only, only matches local and namespace
Special case for AttributeQNames, only local and namespace match
Special case for AttributeQNames, only local and namespace match
Search for all immediate attributes with a matching predicate (allows localName only searches for example)
Search for all immediate attributes with a matching predicate (allows localName only searches for example)
All immediate attributes
All immediate attributes
simple test for string equality
simple test for string equality
simply forwards the current context, element\item specific versions exist that step downwards in document order
simply forwards the current context, element\item specific versions exist that step downwards in document order
all children unpacked, normal xpath requires the context in E1/E2, which hugely complicates things, so \ is this, \+ is \ in the case where unpacking is needed which just leaves \* varieties for elements.
all children unpacked, normal xpath requires the context in E1/E2, which hugely complicates things, so \ is this, \+ is \ in the case where unpacking is needed which just leaves \* varieties for elements.
Loose match for UnprefixedQNames only, only matches local and namespace
Loose match for UnprefixedQNames only, only matches local and namespace
Special case for AttributeQNames, only local and namespace match
Special case for AttributeQNames, only local and namespace match
All descendants, uses XPathInfo eager to choose an implementation
All descendants, uses XPathInfo eager to choose an implementation
Loose match for UnprefixedQNames only, only matches local and namespace
Loose match for UnprefixedQNames only, only matches local and namespace
Special case for AttributeQNames, only local and namespace match
Special case for AttributeQNames, only local and namespace match
Parents of these paths
Parents of these paths
All parents of this node
All parents of this node
All parents of this node or this node
All parents of this node or this node
all cdata child elements
all cdata child elements
all commnent child elements
all commnent child elements
As per spec all children of a context but predicates work directly on these children.
As per spec all children of a context but predicates work directly on these children. i.e. path.\.descendant_::.*(pred).*(1) returns the first elem for which pred is true whereas path.\\*(pred).*(1) returns ALL the first elems for which this is true.
All descendants of this node or self
All descendants of this node or self
filter through the current matches
filter through the current matches
All nodes following this given node, in document order, excluding descendants
All nodes following this given node, in document order, excluding descendants
All siblings after the context
All siblings after the context
Allow working within the XPath, easily extend and test
Equivalent to [last() < n]
Equivalent to [last() < n]
Equivalent to [last() = n]
Equivalent to [last() = n]
Equivalent to [last() > n]
Equivalent to [last() > n]
Some when its only one in the result set
all pi child elements
all pi child elements
1 index based, per spec, but unsure if it should be
1 index based, per spec, but unsure if it should be
Equivalent to [position() < pos]
Equivalent to [position() < pos]
Equivalent to [position() > pos]
Equivalent to [position() > pos]
Equivalent to position() = last()
Equivalent to position() = last()
All nodes preceding this given context, in reverse document order, excluding parents
All nodes preceding this given context, in reverse document order, excluding parents
All siblings before the context
All siblings before the context
all text child elements - xpath standard way, including cdata nodes, filtered to join adjacent text nodes
all text child elements - xpath standard way, including cdata nodes, filtered to join adjacent text nodes
all text child elements - not including cdata nodes, neither sorted nor dup filtered
all text child elements - not including cdata nodes, neither sorted nor dup filtered
x prefixed to avoid disturbing the use of an xpath as an iterable
x prefixed to avoid disturbing the use of an xpath as an iterable
Union of the two paths, they must use the same type however
Union of the two paths, they must use the same type however
x | x === x but only when apply fromXPathToIterable (default behaviour anyway)
For attribute paths only ++ on an iterable is supported.
Allow working within the XPath, easily extend and test
In contrast to the specs reverse axis are not supported. This puts an extra effort on the user for translating, but I don't agree with the design anyway. It adds both ambiguity for an embedded dsl:
//a:ShouldRedeclare/../text()[5]/preceding-sibling::text()[1]
is in reverse order (above is previousSibling in Path), whereas
(//a:ShouldRedeclare/../text()[5]/preceding-sibling::text())[1]
is in doc order (the first text child of the parent). Such an arbritary decision does nothing but irritate. A simpler design as found in this implementation is that the user can simply use full scala data functions to reverse as needed.
(Temptation is to provide the base type as SeqLike instead of Iterable as it should be in a sequence with a defined order, also then providing .reverse and friends)