org.xml.sax.misc
Interface NamespaceHandler


public interface NamespaceHandler

Optional add-on SAX2 handler for Namespace declarations. This handler type is optional: not all SAX parsers will support it. To set the NamespaceHandler for a parser, use Configurable.setProperty with the propertyId "http://xml.org/sax/handlers/NamespaceHandler".

See Also:
Configurable

Method Summary
 void endNamespaceDeclScope(java.lang.String prefix)
          Report the end of the scope of a namespace declaration.
 void startNamespaceDeclScope(java.lang.String prefix, java.lang.String uri)
          Report the start of the scope of a namespace declaration.
 

Method Detail

startNamespaceDeclScope

public void startNamespaceDeclScope(java.lang.String prefix,
                                    java.lang.String uri)
                             throws SAXException
Report the start of the scope of a namespace declaration. This event will be reported before the startElement event for the element containing the namespace declaration. All declarations must be properly nested; if there are multiple declarations in a single element, they must end in the opposite order that they began.

Parameters:
prefix - The declared prefix ("" for the default prefix).
uri - The associated namespace URI ("" to cancel the scope for a subbranch).
Throws:
SAXException - The application may throw an exception.
See Also:
endNamespaceDeclScope(java.lang.String), DocumentHandler.startElement(java.lang.String, org.xml.sax.AttributeList)

endNamespaceDeclScope

public void endNamespaceDeclScope(java.lang.String prefix)
                           throws SAXException
Report the end of the scope of a namespace declaration. This event will be reported after the endElement event for the element containing the namespace declaration. Namespace scopes must be properly nested.

Parameters:
prefix - The declared prefix ("" for the default prefix).
Throws:
SAXException - The application may throw an exception.
See Also:
startNamespaceDeclScope(java.lang.String, java.lang.String), DocumentHandler.endElement(java.lang.String)