public class NamespaceMaintainer extends Object implements EventIterator, NamespaceResolver
Note that this class merely provides the service of keeping track of which namespaces are currently in scope. It does not attempt to remove duplicate namespace declarations, and it does not perform namespace fixup.
Constructor and Description |
---|
NamespaceMaintainer(EventIterator base)
Create a namespace context for a pull-events pipeline
|
Modifier and Type | Method and Description |
---|---|
String |
getURIForPrefix(String prefix,
boolean useDefault)
Get the namespace URI corresponding to a given prefix.
|
boolean |
isFlatSequence()
Determine whether the EventIterator returns a flat sequence of events, or whether it can return
nested event iterators
|
Iterator<String> |
iteratePrefixes()
Get an iterator over all the prefixes declared in this namespace context.
|
PullEvent |
next()
Get the next event in the sequence
|
public NamespaceMaintainer(EventIterator base)
base
- the previous stage in the pipeline, from which events are readpublic boolean isFlatSequence()
isFlatSequence
in interface EventIterator
public PullEvent next() throws XPathException
next
in interface EventIterator
XPathException
- if a dynamic evaluation error occurspublic String getURIForPrefix(String prefix, boolean useDefault)
getURIForPrefix
in interface NamespaceResolver
prefix
- the namespace prefixuseDefault
- true if the default namespace is to be used when the
prefix is ""public Iterator<String> iteratePrefixes()
iteratePrefixes
in interface NamespaceResolver
Copyright (c) 2004-2013 Saxonica Limited. All rights reserved.