Package com.saxonica.xqj.pull

## Class ElementNameTracker

- java.lang.Object
- - net.sf.saxon.pull.PullFilter
  - - com.saxonica.xqj.pull.ElementNameTracker

- All Implemented Interfaces:
    `PullProvider`

      public class ElementNameTracker
      extends PullFilter

  This is a filter that can be added to a pull pipeline to remember element names so that they are available immediately after the END_ELEMENT event is notified

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface net.sf.saxon.pull.PullProvider

      `PullProvider.Event`

  - ### Field Summary

    - ### Fields inherited from class net.sf.saxon.pull.PullFilter

      `currentEvent`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `ElementNameTracker​(PullProvider base)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `NodeName` | `getNodeName()` | Get the node name identifying the name of the current node.
    `PullProvider.Event` | `next()` | Get the next event.

    - ### Methods inherited from class net.sf.saxon.pull.PullFilter

      `close, current, getAtomicValue, getAttributes, getNamePool, getNamespaceDeclarations, getPipelineConfiguration, getSchemaType, getSourceLocator, getStringValue, getUnderlyingProvider, getUnparsedEntities, setPipelineConfiguration, skipToMatchingEnd`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ElementNameTracker

          public ElementNameTracker​(PullProvider base)

  - ### Method Detail

    - #### next

          public PullProvider.Event next()
                                  throws XPathException

      Get the next event.

      Note that a subclass that overrides this method is responsible for ensuring that current() works properly. This can be achieved by setting the field currentEvent to the event returned by any call on next().

      Specified by:
        `next` in interface `PullProvider`
      Overrides:
        `next` in class `PullFilter`
      Returns:
        an integer code indicating the type of event. The code `PullProvider.Event.END_OF_INPUT` is returned at the end of the sequence.
      Throws:
        `XPathException` - if a dynamic error occurs

    - #### getNodeName

          public NodeName getNodeName()

      Get the node name identifying the name of the current node. This method can be used after the `PullProvider.Event.START_ELEMENT`, `PullProvider.Event.PROCESSING_INSTRUCTION`, `PullProvider.Event.ATTRIBUTE`, or `PullProvider.Event.NAMESPACE` events. With some PullProvider implementations, including this one, it can also be used after `PullProvider.Event.END_ELEMENT`: in fact, that is the main purpose of this class. If called at other times, the result is undefined and may result in an IllegalStateException. If called when the current node is an unnamed namespace node (a node representing the default namespace) the returned value is -1.
      Specified by:
        `getNodeName` in interface `PullProvider`
      Overrides:
        `getNodeName` in class `PullFilter`
      Returns:
        the node name. This can be used to obtain the prefix, local name, and namespace URI from the name pool.