Returns the ancestors, starting with the parent (if any), and ending with a root absolute path
Returns the ancestors-or-self, starting with this absolute path, then the parent (if any), and ending with a root absolute path.
Appends a given Entry to this AbsolutePath
Convenience method returning true if at least one entry has the given element name
Returns the element name (as EName) of the last absolute path entry
Returns ancestors.find(p)
Returns ancestorsOrSelf.find(p)
Returns the first entry
Returns true if this absolute path has precisely one entry
Returns the last entry
Like parentOption, but unwrapping the result (or throwing an exception otherwise)
Gets the parent (if any, because a root path has no parent) wrapped in an Option.
Returns the corresponding canonical XPath, replacing QNames by URI qualified EQ-names.
Returns the corresponding canonical XPath, replacing QNames by URI qualified EQ-names.
See http://ns.inria.org/active-tags/glossary/glossary.html#canonical-path for (real) canonical XPath.
The XPath expressions returned by this method need no context to convey their semantics, unlike XPath expressions containing QNames (canonical or otherwise). This is an important advantage of these expressions, in spite of their relative verbosity. A good use case is error reporting about parts of XML documents. For example, Saxon-EE uses a similar notation for error reporting (in XML format) in its schema validator.
Returns toCanonicalXPath
Returns toCanonicalXPath
Absolute path of a descendant (or self)
Elemrelative to and starting with a rootElem. It represents a unique absolute path to an element, given a root element, independent of other types of nodes, as if the XML tree only consists of elements.Unlike
Pathobjects, which are navigation paths and relative to some root element, absolute paths are absolute, containing the root element (as absolute path entry) as well. The absolute paths can never be empty (unlike navigation paths).An eu.cdevreeze.yaidom.core.AbsolutePath corresponds to one and only one canonical path of the element, which is the corresponding (canonical) XPath expression. See http://ns.inria.org/active-tags/glossary/glossary.html#canonical-path. Note, however, that these XPath expression use URI qualified EQ-names rather than qualified names.
The
toStringformat of absolute paths is the same as for the equally named class in Saxon. Note the Saxon absolute paths may be empty, whereas yaidom absolute paths can never be empty. After all, yaidom absolute paths can only be used for elements, not for documents.