net.sf.saxon.pull
public class PullNamespaceReducer extends PullFilter implements NamespaceResolver
This class is derived from, and contains much common code with, the NamespaceReducer in the push pipeline. (In the push version, however, namespace fixup is not performed by the NamespaceReducer, but by the ComplexContentOutputter).
See Also: NamespaceReducer
Constructor Summary | |
---|---|
PullNamespaceReducer(PullProvider base) |
Method Summary | |
---|---|
void | endElement()
endElement: Discard the namespaces declared on this element. |
AttributeCollection | getAttributes()
Get the attributes associated with the current element. |
int | getNameCode()
Get the nameCode identifying the name of the current node. |
NamespaceDeclarations | getNamespaceDeclarations()
Get the namespace declarations associated with the current element. |
protected short | getURICode(short prefixCode)
Get the URI code corresponding to a given prefix code, by searching the
in-scope namespaces. |
String | getURIForPrefix(String prefix, boolean useDefault)
Get the namespace URI corresponding to a given prefix. |
Iterator | iteratePrefixes()
Get an iterator over all the prefixes declared in this namespace context. |
int | next()
next(): handle next event.
|
Attributes may be read before or after reading the namespaces of an element, but must not be read after the first child node has been read, or after calling one of the methods skipToEnd(), getStringValue(), or getTypedValue().
Returns: an AttributeCollection representing the attributes of the element that has just been notified.
Returns: the nameCode. The nameCode can be used to obtain the prefix, local name, and namespace URI from the name pool.
It is permissible for this method to return namespace declarations that are redundant.
The NamespaceDeclarations object is guaranteed to remain unchanged until the next START_ELEMENT event, but may then be overwritten. The object should not be modified by the client.
Namespaces may be read before or after reading the attributes of an element, but must not be read after the first child node has been read, or after calling one of the methods skipToEnd(), getStringValue(), or getTypedValue().
*Parameters: prefixCode the 16-bit prefix code required
Returns: the 16-bit URI code, or -1 if the prefix is not found
Parameters: prefix the namespace prefix useDefault true if the default namespace is to be used when the prefix is ""
Returns: the uri for the namespace, or null if the prefix is not in scope