| java.lang.Object net.sf.saxon.pull.PullFilter net.sf.saxon.pull.PullNamespaceReducer
PullNamespaceReducer | public class PullNamespaceReducer extends PullFilter implements NamespaceResolver(Code) | | PullNamespaceReducer is a PullFilter responsible for removing duplicate namespace
declarations. It also performs namespace fixup: that is, it ensures that the
namespaces used in element and attribute names are all declared.
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: net.sf.saxon.event.NamespaceReducer |
endElement | public void endElement() throws XPathException(Code) | | endElement: Discard the namespaces declared on this element.
|
getAttributes | public AttributeCollection getAttributes() throws XPathException(Code) | | Get the attributes associated with the current element. This method must
be called only after a START_ELEMENT event has been notified. The contents
of the returned AttributeCollection are guaranteed to remain unchanged
until the next START_ELEMENT event, but may be modified thereafter. The object
should not be modified by the client.
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().
an AttributeCollection representing the attributes of the elementthat has just been notified. |
getNamespaceDeclarations | public NamespaceDeclarations getNamespaceDeclarations() throws XPathException(Code) | | Get the namespace declarations associated with the current element. This method must
be called only after a START_ELEMENT event has been notified. In the case of a top-level
START_ELEMENT event (that is, an element that either has no parent node, or whose parent
is not included in the sequence being read), the NamespaceDeclarations object returned
will contain a namespace declaration for each namespace that is in-scope for this element
node. In the case of a non-top-level element, the NamespaceDeclarations will contain
a set of namespace declarations and undeclarations, representing the differences between
this element and its parent.
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(). *
|
getURICode | protected short getURICode(short prefixCode)(Code) | | Get the URI code corresponding to a given prefix code, by searching the
in-scope namespaces. This is a service provided to subclasses.
Parameters: prefixCode - the 16-bit prefix code required the 16-bit URI code, or -1 if the prefix is not found |
getURIForPrefix | public String getURIForPrefix(String prefix, boolean useDefault)(Code) | | Get the namespace URI corresponding to a given prefix. Return null
if the prefix is not in scope.
Parameters: prefix - the namespace prefix Parameters: useDefault - true if the default namespace is to be used when theprefix is "" the uri for the namespace, or null if the prefix is not in scope |
iteratePrefixes | public Iterator iteratePrefixes()(Code) | | Get an iterator over all the prefixes declared in this namespace context. This will include
the default namespace (prefix="") and the XML namespace where appropriate
|
next | public int next() throws XPathException(Code) | | next(): handle next event.
The START_ELEMENT event removes redundant namespace declarations, and
possibly adds an xmlns="" undeclaration.
|
Fields inherited from net.sf.saxon.pull.PullFilter | protected int currentEvent(Code)(Java Doc)
|
|
|