Package net.sf.saxon.om
Class AbsolutePath
- java.lang.Object
-
- net.sf.saxon.om.AbsolutePath
-
public class AbsolutePath extends java.lang.Object
Represents the path from the root of an XDM tree to a specific node, as a sequence of (name, position) pairs
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AbsolutePath.PathElement
Inner class representing one step in the path
-
Constructor Summary
Constructors Constructor Description AbsolutePath(java.util.List<AbsolutePath.PathElement> path)
Create an absolute path given a list of path elements
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
appendAttributeName(NodeName attributeName)
Append an attribute name to the pathboolean
equals(java.lang.Object obj)
java.lang.String
getPathUsingAbbreviatedUris()
Get a string representing the path using abbreviated namespace URIs to represent QNamesjava.lang.String
getPathUsingPrefixes()
Get a string representing the path using namespace prefixes to represent QNamesjava.lang.String
getPathUsingUris()
Get a string representing the path using namespace URIs to represent QNamesjava.lang.String
getSystemId()
int
hashCode()
static AbsolutePath
pathToNode(NodeInfo node)
Create an absolute path given a Nodevoid
setSystemId(java.lang.String systemId)
java.lang.String
toString()
-
-
-
Constructor Detail
-
AbsolutePath
public AbsolutePath(java.util.List<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 Detail
-
appendAttributeName
public void appendAttributeName(NodeName attributeName)
Append an attribute name to the path- Parameters:
attributeName
- the name of the attribute
-
pathToNode
public static AbsolutePath pathToNode(NodeInfo node)
Create an absolute path given a Node- Parameters:
node
- the node whose path is required
-
getPathUsingPrefixes
public java.lang.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
public java.lang.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
public java.lang.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
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
setSystemId
public void setSystemId(java.lang.String systemId)
-
getSystemId
public java.lang.String getSystemId()
-
-