| java.lang.Object net.sf.saxon.event.SequenceReceiver net.sf.saxon.event.ProxyReceiver net.sf.saxon.event.NamespaceReducer
NamespaceReducer | public class NamespaceReducer extends ProxyReceiver implements NamespaceResolver(Code) | | NamespaceReducer is a ProxyReceiver responsible for removing duplicate namespace
declarations. It also ensures that an xmlns="" undeclaration is output when
necessary. Used on its own, the NamespaceReducer simply eliminates unwanted
namespace declarations. It can also be subclassed, in which case the subclass
can use the services of the NamespaceReducer to resolve QNames.
The NamespaceReducer also validates namespace-sensitive content.
|
Method Summary | |
public void | endElement() endElement: Discard the namespaces declared on this element. | protected short | getURICode(short prefixCode) Get the URI code corresponding to a given prefix code, by searching the
in-scope namespaces. | public String | getURIForPrefix(String prefix, boolean useDefault) Get the namespace URI corresponding to a given prefix. | public Iterator | iteratePrefixes() Get an iterator over all the prefixes declared in this namespace context. | public void | namespace(int namespaceCode, int properties) | public void | startContent() | public void | startElement(int nameCode, int typeCode, int locationId, int properties) startElement. |
endElement | public void endElement() throws XPathException(Code) | | endElement: Discard the namespaces declared on this element.
|
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
|
startContent | public void startContent() throws XPathException(Code) | | startContent: Add any namespace undeclarations needed to stop
namespaces being inherited from parent elements
|
startElement | public void startElement(int nameCode, int typeCode, int locationId, int properties) throws XPathException(Code) | | startElement. This call removes redundant namespace declarations, and
possibly adds an xmlns="" undeclaration.
|
Methods inherited from net.sf.saxon.event.ProxyReceiver | public void attribute(int nameCode, int typeCode, CharSequence value, int locationId, int properties) throws XPathException(Code)(Java Doc) public void characters(CharSequence chars, int locationId, int properties) throws XPathException(Code)(Java Doc) public void close() throws XPathException(Code)(Java Doc) public void comment(CharSequence chars, int locationId, int properties) throws XPathException(Code)(Java Doc) public void endDocument() throws XPathException(Code)(Java Doc) public void endElement() throws XPathException(Code)(Java Doc) public Configuration getConfiguration()(Code)(Java Doc) public LocationProvider getDocumentLocator()(Code)(Java Doc) public NamePool getNamePool()(Code)(Java Doc) public String getSystemId()(Code)(Java Doc) public Receiver getUnderlyingReceiver()(Code)(Java Doc) public void namespace(int namespaceCode, int properties) throws XPathException(Code)(Java Doc) public void open() throws XPathException(Code)(Java Doc) public void processingInstruction(String target, CharSequence data, int locationId, int properties) throws XPathException(Code)(Java Doc) public void setPipelineConfiguration(PipelineConfiguration config)(Code)(Java Doc) public void setSystemId(String systemId)(Code)(Java Doc) public void setUnderlyingReceiver(Receiver receiver)(Code)(Java Doc) public void setUnparsedEntity(String name, String uri, String publicId) throws XPathException(Code)(Java Doc) public void startContent() throws XPathException(Code)(Java Doc) public void startDocument(int properties) throws XPathException(Code)(Java Doc) public void startElement(int nameCode, int typeCode, int locationId, int properties) throws XPathException(Code)(Java Doc)
|
|
|