public class ElementNameTracker extends PullFilter
currentEventATOMIC_VALUE, ATTRIBUTE, COMMENT, END_DOCUMENT, END_ELEMENT, END_OF_INPUT, NAMESPACE, PROCESSING_INSTRUCTION, START_DOCUMENT, START_ELEMENT, START_OF_INPUT, TEXT| Constructor and Description |
|---|
ElementNameTracker(PullProvider base) |
| Modifier and Type | Method and Description |
|---|---|
int |
getNameCode()
Get the nameCode identifying the name of the current node.
|
int |
next()
Get the next event.
|
close, current, getAtomicValue, getAttributes, getFingerprint, getNamePool, getNamespaceDeclarations, getPipelineConfiguration, getSchemaType, getSourceLocator, getStringValue, getUnderlyingProvider, getUnparsedEntities, setPipelineConfiguration, skipToMatchingEndpublic ElementNameTracker(PullProvider base)
public int next()
throws XPathException
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().
next in interface PullProvidernext in class PullFilterPullProvider.END_OF_INPUT is returned at the end of the sequence.XPathException - if a dynamic error occurspublic int getNameCode()
PullProvider.START_ELEMENT, PullProvider.PROCESSING_INSTRUCTION,
PullProvider.ATTRIBUTE, or PullProvider.NAMESPACE events. With some PullProvider implementations,
including this one, it can also be used after PullProvider.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.getNameCode in interface PullProvidergetNameCode in class PullFilterCopyright (c) 2004-2013 Saxonica Limited. All rights reserved.