Class RootNode

  • All Implemented Interfaces:
    Iterable, Source, SourceLocator, net.sf.saxon.expr.parser.Location, net.sf.saxon.om.GroundedValue, net.sf.saxon.om.Item, net.sf.saxon.om.NodeInfo, net.sf.saxon.om.Sequence, Locator

    public class RootNode
    extends AbstractNode
    Represents root node of Xpath-tree.
    • Constructor Detail

      • RootNode

        public RootNode​(DetailAST detailAst)
        Creates a new RootNode instance.
        Parameters:
        detailAst - reference to DetailAST
    • Method Detail

      • getAttributeValue

        public String getAttributeValue​(String namespace,
                                        String localPart)
        Returns attribute value. Throws UnsupportedOperationException because root node has no attributes.
        Parameters:
        namespace - namespace
        localPart - actual name of the attribute
        Returns:
        attribute value
      • getLocalPart

        public String getLocalPart()
        Returns local part.
        Returns:
        local part
      • getNodeKind

        public int getNodeKind()
        Returns type of the node.
        Returns:
        node kind
      • getParent

        public net.sf.saxon.om.NodeInfo getParent()
        Returns parent.
        Returns:
        parent
      • getRoot

        public net.sf.saxon.om.NodeInfo getRoot()
        Returns root of the tree.
        Returns:
        root of the tree
      • getStringValue

        public String getStringValue()
        Returns string value.
        Returns:
        string value
      • iterateAxis

        public net.sf.saxon.tree.iter.AxisIterator iterateAxis​(byte axisNumber)
        Determines axis iteration algorithm. Throws UnsupportedOperationException in case, when there is no axis iterator for given axisNumber.
        Parameters:
        axisNumber - element from AxisInfo
        Returns:
        AxisIterator object
      • getLineNumber

        public int getLineNumber()
        Returns line number.
        Returns:
        line number
      • getColumnNumber

        public int getColumnNumber()
        Returns column number.
        Returns:
        column number
      • getTokenType

        public int getTokenType()
        Getter method for token type.
        Specified by:
        getTokenType in class AbstractNode
        Returns:
        token type