Class ElementNode

All Implemented Interfaces:
Source, SourceLocator, net.sf.saxon.lib.ActiveSource, net.sf.saxon.om.GroundedValue, net.sf.saxon.om.Item, net.sf.saxon.om.NodeInfo, net.sf.saxon.om.Sequence, net.sf.saxon.s9api.Location, Locator

public class ElementNode extends AbstractElementNode
Represents DetailAST's element node of Xpath-tree.
  • Field Details

    • detailAst

      private final DetailAST detailAst
      The ast node.
  • Constructor Details

    • ElementNode

      public ElementNode(AbstractNode root, AbstractNode parent, DetailAST detailAst, int depth, int indexAmongSiblings)
      Creates a new ElementNode instance.
      Parameters:
      root - Node root of the tree
      parent - Node parent of the current node
      detailAst - reference to DetailAST
      depth - the current node depth in the hierarchy
      indexAmongSiblings - the current node index among the parent children nodes
  • Method Details

    • createChildren

      protected List<AbstractNode> createChildren()
      Iterates children of the current node and recursively creates new Xpath-nodes.
      Specified by:
      createChildren in class AbstractNode
      Returns:
      children list
    • hasChildNodes

      public boolean hasChildNodes()
      Determine whether the node has any children.
      Returns:
      true is the node has any children.
    • getLocalPart

      public String getLocalPart()
      Returns local part.
      Returns:
      local part
    • 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
    • getUnderlyingNode

      public DetailAST getUnderlyingNode()
      Returns underlying node.
      Specified by:
      getUnderlyingNode in class AbstractNode
      Returns:
      underlying node
    • createAttributeNode

      protected AttributeNode createAttributeNode()
      Description copied from class: AbstractElementNode
      Creates AttributeNode object and returns it.
      Specified by:
      createAttributeNode in class AbstractElementNode
      Returns:
      attribute node if possible, otherwise the null value