Class AbsolutePath

java.lang.Object
net.sf.saxon.om.AbsolutePath

public class AbsolutePath extends Object
Represents the path from the root of an XDM tree to a specific node, as a sequence of (name, position) pairs
  • Constructor Details Link icon

    • AbsolutePath Link icon

      public AbsolutePath(Collection<AbsolutePath.PathElement> path)
      Create an absolute path given a list of path elements
      Parameters:
      path - the list of path elements, starting from the root. It is not necessary to include a path element for the document node.
  • Method Details Link icon

    • appendAttributeName Link icon

      public void appendAttributeName(NodeName attributeName)
      Append an attribute name to the path
      Parameters:
      attributeName - the name of the attribute
    • pathToNode Link icon

      public static AbsolutePath pathToNode(NodeInfo node)
      Create an absolute path given a Node
      Parameters:
      node - the node whose path is required
      Returns:
      the absolute path
    • getPathUsingPrefixes Link icon

      public String getPathUsingPrefixes()
      Get a string representing the path using namespace prefixes to represent QNames
      Returns:
      the path in the form /prefix:local[n]/prefix:local[m]/...
    • getPathUsingUris Link icon

      public String getPathUsingUris()
      Get a string representing the path using namespace URIs to represent QNames
      Returns:
      the path in the form /Q{uri}local[n]/Q{uri}local[m]/...
    • getPathUsingAbbreviatedUris Link icon

      public String getPathUsingAbbreviatedUris()
      Get a string representing the path using abbreviated namespace URIs to represent QNames
      Returns:
      the path in the form /Q{uri}local[n]/Q{uri}local[m]/..., with the URIs shortened
    • toString Link icon

      public String toString()
      Overrides:
      toString in class Object
    • equals Link icon

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode Link icon

      public int hashCode()
      Overrides:
      hashCode in class Object
    • setSystemId Link icon

      public void setSystemId(String systemId)
    • getSystemId Link icon

      public String getSystemId()
    • getPathElements Link icon

      public List<AbsolutePath.PathElement> getPathElements()
      Get the path as a list of AbsolutePath.PathElement objects
      Returns:
      a list of PathElements giving the names and positions of ancestor elements of the invalid element, starting at the root.