org.apache.xml.serializer

## Class EmptySerializer

- java.lang.Object
- - org.apache.xml.serializer.EmptySerializer

All Implemented Interfaces:
  DOMSerializer, ExtendedContentHandler, ExtendedLexicalHandler, SerializationHandler, Serializer, ContentHandler, DTDHandler, ErrorHandler, DeclHandler, LexicalHandler

Direct Known Subclasses:
  SimpleResultTreeImpl, StringValueHandler

    public class EmptySerializer
    extends java.lang.Object
    implements SerializationHandler

This class is an adapter class. Its only purpose is to be extended and for that extended class to over-ride all methods that are to be used. This class is not a public API, it is only public because it is used across package boundaries.

Usage:
  **For internal use only**

### Field Summary

### Fields inherited from interface org.apache.xml.serializer.ExtendedContentHandler

`HTML_ATTREMPTY, HTML_ATTRURL, NO_BAD_CHARS`

### Constructor Summary

Constructors
Constructor and Description
`EmptySerializer()`

### Method Summary

Methods
`void` `addAttribute(java.lang.String name, java.lang.String value)` Add an attribute to the current element.
`void` `addAttribute(java.lang.String uri, java.lang.String localName, java.lang.String rawName, java.lang.String type, java.lang.String value)` Add at attribute to the current element, not from an xsl:attribute element.
`void` `addAttribute(java.lang.String uri, java.lang.String localName, java.lang.String rawName, java.lang.String type, java.lang.String value, boolean XSLAttribute)` Add at attribute to the current element
`void` `addAttributes(Attributes atts)` Add attributes to the current element
`void` `addUniqueAttribute(java.lang.String name, java.lang.String value, int flags)` Add a unique attribute to the current element.
`void` `addXSLAttribute(java.lang.String qName, java.lang.String value, java.lang.String uri)` Add an attribute from an xsl:attribute element.
`ContentHandler` `asContentHandler()` Return a `ContentHandler` interface to provide SAX input to.
`java.lang.Object` `asDOM3Serializer()` Return an Object into this serializer to be cast to a DOM3Serializer.
`DOMSerializer` `asDOMSerializer()` Return a `DOMSerializer` interface into this serializer.
`void` `attributeDecl(java.lang.String arg0, java.lang.String arg1, java.lang.String arg2, java.lang.String arg3, java.lang.String arg4)` Report an attribute type declaration.
`void` `characters(char[] arg0, int arg1, int arg2)` Receive notification of character data.
`void` `characters(Node node)` This method is used to notify of a character event, but passing the data as a DOM Node rather than the standard character array.
`void` `characters(java.lang.String chars)` This method is used to notify of a character event, but passing the data as a character String rather than the standard character array.
`void` `close()`
`void` `comment(char[] arg0, int arg1, int arg2)` Report an XML comment anywhere in the document.
`void` `comment(java.lang.String comment)` This method is used to notify of a comment
`void` `elementDecl(java.lang.String arg0, java.lang.String arg1)` Report an element type declaration.
`void` `endCDATA()` Report the end of a CDATA section.
`void` `endDocument()` Receive notification of the end of a document.
`void` `endDTD()` Report the end of DTD declarations.
`void` `endElement(java.lang.String elemName)` This method is used to notify that an element has ended.
`void` `endElement(java.lang.String arg0, java.lang.String arg1, java.lang.String arg2)` Receive notification of the end of an element.
`void` `endEntity(java.lang.String arg0)` Report the end of an entity.
`void` `endPrefixMapping(java.lang.String arg0)` End the scope of a prefix-URI mapping.
`void` `entityReference(java.lang.String entityName)` Notify of an entity reference.
`void` `error(SAXParseException arg0)` Receive notification of a recoverable error.
`void` `externalEntityDecl(java.lang.String arg0, java.lang.String arg1, java.lang.String arg2)` Report a parsed external entity declaration.
`void` `fatalError(SAXParseException arg0)` Receive notification of a non-recoverable error.
`void` `flushPending()` A SerializationHandler accepts SAX-like events, so it can accumulate attributes or namespace nodes after a startElement().
`java.lang.String` `getDoctypePublic()` Returns the previously set value of the value to be used as the public identifier in the document type declaration (DTD).
`java.lang.String` `getDoctypeSystem()` Returns the previously set value of the value to be used as the system identifier in the document type declaration (DTD).
`java.lang.String` `getEncoding()`
`boolean` `getIndent()`
`int` `getIndentAmount()`
`java.lang.String` `getMediaType()`
`NamespaceMappings` `getNamespaceMappings()` This method returns an object that has the current namespace mappings in effect.
`java.lang.String` `getNamespaceURI(java.lang.String name, boolean isElement)` This method gets the prefix associated with a current element or attribute name.
`java.lang.String` `getNamespaceURIFromPrefix(java.lang.String prefix)` This method returns the namespace URI currently associated with the prefix.
`boolean` `getOmitXMLDeclaration()`
`java.util.Properties` `getOutputFormat()` Returns the output format properties for this serializer.
`java.lang.String` `getOutputProperty(java.lang.String name)` Get the value for a property that affects seraialization, if a property was set return that value, otherwise return the default value, otherwise return null.
`java.lang.String` `getOutputPropertyDefault(java.lang.String name)` Get the default value for a property that affects seraialization, or null if there is none.
`java.io.OutputStream` `getOutputStream()` Get the output stream where the events will be serialized to.
`java.lang.String` `getPrefix(java.lang.String uri)` This method returns the prefix that currently maps to the given namespace URI.
`java.lang.String` `getStandalone()`
`Transformer` `getTransformer()` Get the transformer associated with the serializer.
`java.lang.String` `getVersion()`
`java.io.Writer` `getWriter()` Get the character stream where the events will be serialized to.
`void` `ignorableWhitespace(char[] arg0, int arg1, int arg2)` Receive notification of ignorable whitespace in element content.
`void` `internalEntityDecl(java.lang.String arg0, java.lang.String arg1)` Report an internal entity declaration.
`void` `namespaceAfterStartElement(java.lang.String uri, java.lang.String prefix)` This method is used to notify that a prefix mapping is to start, but after an element is started.
`void` `notationDecl(java.lang.String arg0, java.lang.String arg1, java.lang.String arg2)` Receive notification of a notation declaration event.
`void` `processingInstruction(java.lang.String arg0, java.lang.String arg1)` Receive notification of a processing instruction.
`boolean` `reset()` This method resets the serializer.
`void` `serialize(Node node)` Notify that the serializer should take this DOM node as input to be serialized.
`void` `setCdataSectionElements(java.util.Hashtable h)`
`void` `setCdataSectionElements(java.util.Vector URI_and_localNames)` Sets the value coming from the xsl:output cdata-section-elements stylesheet property.
`void` `setContentHandler(ContentHandler ch)` Set the SAX Content handler that the serializer sends its output to.
`void` `setDoctype(java.lang.String system, java.lang.String pub)` Set the value coming from the xsl:output doctype-public and doctype-system stylesheet properties
`void` `setDoctypePublic(java.lang.String doctype)` Set the value coming from the xsl:output doctype-public stylesheet attribute.
`void` `setDoctypeSystem(java.lang.String doctype)` Set the value coming from the xsl:output doctype-system stylesheet attribute.
`void` `setDocumentLocator(Locator arg0)` Receive an object for locating the origin of SAX document events.
`void` `setDTDEntityExpansion(boolean expand)` Default behavior is to expand DTD entities, that is the initall default value is true.
`void` `setEncoding(java.lang.String encoding)` Sets the character encoding coming from the xsl:output encoding stylesheet attribute.
`boolean` `setEscaping(boolean escape)` Turns special character escaping on/off.
`void` `setIndent(boolean indent)` Sets the value coming from the xsl:output indent stylesheet attribute.
`void` `setIndentAmount(int spaces)` Set the number of spaces to indent for each indentation level.
`void` `setMediaType(java.lang.String mediatype)` Sets the value coming from the xsl:output media-type stylesheet attribute.
`void` `setNamespaceMappings(NamespaceMappings mappings)` Used only by TransformerSnapshotImpl to restore the serialization to a previous state.
`void` `setOmitXMLDeclaration(boolean b)` Sets the value coming from the xsl:output omit-xml-declaration stylesheet attribute
`void` `setOutputFormat(java.util.Properties format)` Specifies an output format for this serializer.
`void` `setOutputProperty(java.lang.String name, java.lang.String val)` Set the non-default value for a property that affects seraialization.
`void` `setOutputPropertyDefault(java.lang.String name, java.lang.String val)` Set the default value for a property that affects seraialization.
`void` `setOutputStream(java.io.OutputStream output)` Specifies an output stream to which the document should be serialized.
`void` `setSourceLocator(SourceLocator locator)` This method is used to set the source locator, which might be used to generated an error message.
`void` `setStandalone(java.lang.String standalone)` Sets the value coming from the xsl:output standalone stylesheet attribute.
`void` `setTransformer(Transformer transformer)` Set the transformer associated with the serializer.
`void` `setVersion(java.lang.String version)` Sets the value coming from the xsl:output version attribute.
`void` `setWriter(java.io.Writer writer)` Specifies a writer to which the document should be serialized.
`void` `skippedEntity(java.lang.String arg0)` Receive notification of a skipped entity.
`void` `startCDATA()` Report the start of a CDATA section.
`void` `startDocument()` Receive notification of the beginning of a document.
`void` `startDTD(java.lang.String arg0, java.lang.String arg1, java.lang.String arg2)` Report the start of DTD declarations, if any.
`void` `startElement(java.lang.String qName)` This method is used to notify of the start of an element
`void` `startElement(java.lang.String uri, java.lang.String localName, java.lang.String qName)` This method is used to notify that an element is starting.
`void` `startElement(java.lang.String arg0, java.lang.String arg1, java.lang.String arg2, Attributes arg3)` Receive notification of the beginning of an element.
`void` `startEntity(java.lang.String arg0)` Report the beginning of some internal and external XML entities.
`void` `startPrefixMapping(java.lang.String arg0, java.lang.String arg1)` Begin the scope of a prefix-URI Namespace mapping.
`boolean` `startPrefixMapping(java.lang.String prefix, java.lang.String uri, boolean shouldFlush)` This method is used to notify that a prefix maping is to start, which can be for the current element, or for the one to come.
`void` `unparsedEntityDecl(java.lang.String arg0, java.lang.String arg1, java.lang.String arg2, java.lang.String arg3)` Receive notification of an unparsed entity declaration event.
`void` `warning(SAXParseException arg0)` Receive notification of a warning.

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### EmptySerializer

    public EmptySerializer()

### Method Detail

#### asContentHandler

    public ContentHandler asContentHandler()
                                    throws java.io.IOException

Description copied from interface: `Serializer`
Return a `ContentHandler` interface to provide SAX input to. Through the returned object the document to be serailized, as a series of SAX events, can be provided to the serialzier. If the serializer does not support the `ContentHandler` interface, it will return null.

In principle only one of asDOMSerializer() or asContentHander() should be called.

Specified by:
  `asContentHandler` in interface `Serializer`
Returns:
  A `ContentHandler` interface into this serializer, or null if the serializer is not SAX 2 capable
Throws:
  `java.io.IOException` - An I/O exception occured
See Also:
  `Serializer.asContentHandler()`

#### setContentHandler

    public void setContentHandler(ContentHandler ch)

Description copied from interface: `SerializationHandler`
Set the SAX Content handler that the serializer sends its output to. This method only applies to a ToSAXHandler, not to a ToStream serializer.

Specified by:
  `setContentHandler` in interface `SerializationHandler`
See Also:
  `SerializationHandler.setContentHandler(org.xml.sax.ContentHandler)`

#### close

    public void close()

Specified by:
  `close` in interface `SerializationHandler`
See Also:
  `SerializationHandler.close()`

#### getOutputFormat

    public java.util.Properties getOutputFormat()

Description copied from interface: `Serializer`
Returns the output format properties for this serializer.

Specified by:
  `getOutputFormat` in interface `Serializer`
Returns:
  The output format key/value pairs in use.
See Also:
  `Serializer.getOutputFormat()`

#### getOutputStream

    public java.io.OutputStream getOutputStream()

Description copied from interface: `Serializer`
Get the output stream where the events will be serialized to.

Specified by:
  `getOutputStream` in interface `Serializer`
Returns:
  reference to the result stream, or null if only a writer was set.
See Also:
  `Serializer.getOutputStream()`

#### getWriter

    public java.io.Writer getWriter()

Description copied from interface: `Serializer`
Get the character stream where the events will be serialized to.

Specified by:
  `getWriter` in interface `Serializer`
Returns:
  Reference to the result Writer, or null.
See Also:
  `Serializer.getWriter()`

#### reset

    public boolean reset()

Description copied from interface: `Serializer`
This method resets the serializer. If this method returns true, the serializer may be used for subsequent serialization of new documents. It is possible to change the output format and output stream prior to serializing, or to reuse the existing output format and output stream or writer.

Specified by:
  `reset` in interface `Serializer`
Returns:
  True if serializer has been reset and can be reused
See Also:
  `Serializer.reset()`

#### serialize

    public void serialize(Node node)
                   throws java.io.IOException

Description copied from interface: `SerializationHandler`
Notify that the serializer should take this DOM node as input to be serialized.

Specified by:
  `serialize` in interface `DOMSerializer`
Specified by:
  `serialize` in interface `SerializationHandler`
Parameters:
  `node` - the DOM node to be serialized.
Throws:
  `java.io.IOException` - if an I/O exception occured while serializing
See Also:
  `SerializationHandler.serialize(org.w3c.dom.Node)`

#### setCdataSectionElements

    public void setCdataSectionElements(java.util.Vector URI_and_localNames)

Sets the value coming from the xsl:output cdata-section-elements stylesheet property. This sets the elements whose text elements are to be output as CDATA sections.

Parameters:
  `URI_and_localNames` - pairs of namespace URI and local names that identify elements whose text elements are to be output as CDATA sections. The namespace of the local element must be the given URI to match. The qName is not given because the prefix does not matter, only the namespace URI to which that prefix would map matters, so the prefix itself is not relevant in specifying which elements have their text to be output as CDATA sections.
See Also:
  `XSLOutputAttributes.setCdataSectionElements(java.util.Vector)`

#### setEscaping

    public boolean setEscaping(boolean escape)
                        throws SAXException

Description copied from interface: `SerializationHandler`
Turns special character escaping on/off. Note that characters will never, even if this option is set to 'true', be escaped within CDATA sections in output XML documents.

Specified by:
  `setEscaping` in interface `SerializationHandler`
Parameters:
  `escape` - true if escaping is to be set on.
Throws:
  `SAXException`
See Also:
  `SerializationHandler.setEscaping(boolean)`

#### setIndent

    public void setIndent(boolean indent)

Sets the value coming from the xsl:output indent stylesheet attribute.

Parameters:
  `indent` - true if the output document should be indented to visually indicate its structure.
See Also:
  `XSLOutputAttributes.setIndent(boolean)`

#### setIndentAmount

    public void setIndentAmount(int spaces)

Description copied from interface: `SerializationHandler`
Set the number of spaces to indent for each indentation level.

Specified by:
  `setIndentAmount` in interface `SerializationHandler`
Parameters:
  `spaces` - the number of spaces to indent for each indentation level.
See Also:
  `SerializationHandler.setIndentAmount(int)`

#### setOutputFormat

    public void setOutputFormat(java.util.Properties format)

Description copied from interface: `Serializer`
Specifies an output format for this serializer. It the serializer has already been associated with an output format, it will switch to the new format. This method should not be called while the serializer is in the process of serializing a document.

The standard property keys supported are: "method", "version", "encoding", "omit-xml-declaration", "standalone", doctype-public", "doctype-system", "cdata-section-elements", "indent", "media-type". These property keys and their values are described in the XSLT recommendation, see XSLT 1.0 recommendation

The non-standard property keys supported are defined in `OutputPropertiesFactory`.

This method can be called multiple times before a document is serialized. Each time it is called more, or over-riding property values, can be specified. One property value that can not be changed is that of the "method" property key.

The value of the "cdata-section-elements" property key is a whitespace separated list of elements. If the element is in a namespace then value is passed in this format: {uri}localName

If the "cdata-section-elements" key is specified on multiple calls to this method the set of elements specified in the value is not replaced from one call to the next, but it is cumulative across the calls.

Specified by:
  `setOutputFormat` in interface `Serializer`
Parameters:
  `format` - The output format to use, as a set of key/value pairs.
See Also:
  `Serializer.setOutputFormat(java.util.Properties)`

#### setOutputStream

    public void setOutputStream(java.io.OutputStream output)

Description copied from interface: `Serializer`
Specifies an output stream to which the document should be serialized. This method should not be called while the serializer is in the process of serializing a document.

The encoding specified in the output `Properties` is used, or if no encoding was specified, the default for the selected output method.

Only one of setWriter() or setOutputStream() should be called.

Specified by:
  `setOutputStream` in interface `Serializer`
Parameters:
  `output` - The output stream
See Also:
  `Serializer.setOutputStream(java.io.OutputStream)`

#### setVersion

    public void setVersion(java.lang.String version)

Sets the value coming from the xsl:output version attribute.

Parameters:
  `version` - the version of the output format.
See Also:
  `XSLOutputAttributes.setVersion(java.lang.String)`

#### setWriter

    public void setWriter(java.io.Writer writer)

Description copied from interface: `Serializer`
Specifies a writer to which the document should be serialized. This method should not be called while the serializer is in the process of serializing a document.

The encoding specified for the output `Properties` must be identical to the output format used with the writer.

Only one of setWriter() or setOutputStream() should be called.

Specified by:
  `setWriter` in interface `Serializer`
Parameters:
  `writer` - The output writer stream
See Also:
  `Serializer.setWriter(java.io.Writer)`

#### setTransformer

    public void setTransformer(Transformer transformer)

Description copied from interface: `SerializationHandler`
Set the transformer associated with the serializer.

Specified by:
  `setTransformer` in interface `SerializationHandler`
Parameters:
  `transformer` - the transformer associated with the serializer.
See Also:
  `SerializationHandler.setTransformer(javax.xml.transform.Transformer)`

#### getTransformer

    public Transformer getTransformer()

Description copied from interface: `SerializationHandler`
Get the transformer associated with the serializer.

Specified by:
  `getTransformer` in interface `SerializationHandler`
Returns:
  Transformer the transformer associated with the serializer.
See Also:
  `SerializationHandler.getTransformer()`

#### flushPending

    public void flushPending()
                      throws SAXException

Description copied from interface: `SerializationHandler`
A SerializationHandler accepts SAX-like events, so it can accumulate attributes or namespace nodes after a startElement().

If the SerializationHandler has a Writer or OutputStream, a call to this method will flush such accumulated events as a closed start tag for an element.

If the SerializationHandler wraps a ContentHandler, a call to this method will flush such accumulated events as a SAX (not SAX-like) calls to startPrefixMapping() and startElement().

If one calls endDocument() then one need not call this method since a call to endDocument() will do what this method does. However, in some circumstances, such as with document fragments, endDocument() is not called and it may be necessary to call this method to flush any pending events.

For performance reasons this method should not be called very often.

Specified by:
  `flushPending` in interface `SerializationHandler`
Throws:
  `SAXException`
See Also:
  `SerializationHandler.flushPending()`

#### addAttribute

    public void addAttribute(java.lang.String uri,
                    java.lang.String localName,
                    java.lang.String rawName,
                    java.lang.String type,
                    java.lang.String value,
                    boolean XSLAttribute)
                      throws SAXException

Description copied from interface: `ExtendedContentHandler`
Add at attribute to the current element

Specified by:
  `addAttribute` in interface `ExtendedContentHandler`
Parameters:
  `uri` - the namespace URI of the attribute name
  `localName` - the local name of the attribute (without prefix)
  `rawName` - the qualified name of the attribute
  `type` - the attribute type typically character data (CDATA)
  `value` - the value of the attribute
  `XSLAttribute` - true if the added attribute is coming from an xsl:attribute element
Throws:
  `SAXException`
See Also:
  `ExtendedContentHandler.addAttribute(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String)`

#### addAttributes

    public void addAttributes(Attributes atts)
                       throws SAXException

Description copied from interface: `ExtendedContentHandler`
Add attributes to the current element

Specified by:
  `addAttributes` in interface `ExtendedContentHandler`
Parameters:
  `atts` - the attributes to add.
Throws:
  `SAXException`
See Also:
  `ExtendedContentHandler.addAttributes(org.xml.sax.Attributes)`

#### addAttribute

    public void addAttribute(java.lang.String name,
                    java.lang.String value)

Description copied from interface: `ExtendedContentHandler`
Add an attribute to the current element. The namespace URI of the attribute will be calculated from the prefix of qName. The local name will be derived from qName and the type will be assumed to be "CDATA".

Specified by:
  `addAttribute` in interface `ExtendedContentHandler`
See Also:
  `ExtendedContentHandler.addAttribute(java.lang.String, java.lang.String)`

#### characters

    public void characters(java.lang.String chars)
                    throws SAXException

Description copied from interface: `ExtendedContentHandler`
This method is used to notify of a character event, but passing the data as a character String rather than the standard character array.

Specified by:
  `characters` in interface `ExtendedContentHandler`
Parameters:
  `chars` - the character data
Throws:
  `SAXException`
See Also:
  `ExtendedContentHandler.characters(java.lang.String)`

#### endElement

    public void endElement(java.lang.String elemName)
                    throws SAXException

Description copied from interface: `ExtendedContentHandler`
This method is used to notify that an element has ended. Unlike the standard SAX method

     endElement(namespaceURI,localName,qName)

only the last parameter is passed. If needed the serializer can derive the localName from the qualified name and derive the namespaceURI from its implementation.

Specified by:
  `endElement` in interface `ExtendedContentHandler`
Parameters:
  `elemName` - the fully qualified element name.
Throws:
  `SAXException`
See Also:
  `ExtendedContentHandler.endElement(java.lang.String)`

#### startDocument

    public void startDocument()
                       throws SAXException

Description copied from interface: `ContentHandler`
Receive notification of the beginning of a document.

The SAX parser will invoke this method only once, before any other event callbacks (except for `setDocumentLocator`).

Specified by:
  `startDocument` in interface `ContentHandler`
Throws:
  `SAXException` - any SAX exception, possibly wrapping another exception
See Also:
  `ContentHandler.startDocument()`

#### startElement

    public void startElement(java.lang.String uri,
                    java.lang.String localName,
                    java.lang.String qName)
                      throws SAXException

Description copied from interface: `ExtendedContentHandler`
This method is used to notify that an element is starting. This method is just like the standard SAX method

     startElement(uri,localName,qname,atts)

but without the attributes.

Specified by:
  `startElement` in interface `ExtendedContentHandler`
Parameters:
  `uri` - the namespace URI of the element
  `localName` - the local name (without prefix) of the element
  `qName` - the qualified name of the element
Throws:
  `SAXException`
See Also:
  `ExtendedContentHandler.startElement(java.lang.String, java.lang.String, java.lang.String)`

#### startElement

    public void startElement(java.lang.String qName)
                      throws SAXException

Description copied from interface: `ExtendedContentHandler`
This method is used to notify of the start of an element

Specified by:
  `startElement` in interface `ExtendedContentHandler`
Parameters:
  `qName` - the fully qualified name of the element
Throws:
  `SAXException`
See Also:
  `ExtendedContentHandler.startElement(java.lang.String)`

#### namespaceAfterStartElement

    public void namespaceAfterStartElement(java.lang.String uri,
                                  java.lang.String prefix)
                                    throws SAXException

Description copied from interface: `ExtendedContentHandler`
This method is used to notify that a prefix mapping is to start, but after an element is started. The SAX method call

     startPrefixMapping(prefix,uri)

is used just before an element starts and applies to the element to come, not to the current element. This method applies to the current element. For example one could make the calls in this order:

     startElement("prfx8:elem9")
     namespaceAfterStartElement("http://namespace8","prfx8")

Specified by:
  `namespaceAfterStartElement` in interface `ExtendedContentHandler`
Parameters:
  `uri` - the namespace URI being declared
  `prefix` - the prefix that maps to the given namespace
Throws:
  `SAXException`
See Also:
  `ExtendedContentHandler.namespaceAfterStartElement(java.lang.String, java.lang.String)`

#### startPrefixMapping

    public boolean startPrefixMapping(java.lang.String prefix,
                             java.lang.String uri,
                             boolean shouldFlush)
                               throws SAXException

Description copied from interface: `ExtendedContentHandler`
This method is used to notify that a prefix maping is to start, which can be for the current element, or for the one to come.

Specified by:
  `startPrefixMapping` in interface `ExtendedContentHandler`
Parameters:
  `prefix` - the prefix that maps to the given URI
  `uri` - the namespace URI of the given prefix
  `shouldFlush` - if true this call is like the SAX startPrefixMapping(prefix,uri) call and the mapping applies to the element to come. If false the mapping applies to the current element.
Returns:
  boolean false if the prefix mapping was already in effect (in other words we are just re-declaring), true if this is a new, never before seen mapping for the element.
Throws:
  `SAXException`
See Also:
  `ExtendedContentHandler.startPrefixMapping(java.lang.String, java.lang.String, boolean)`

#### entityReference

    public void entityReference(java.lang.String entityName)
                         throws SAXException

Description copied from interface: `ExtendedContentHandler`
Notify of an entity reference.

Specified by:
  `entityReference` in interface `ExtendedContentHandler`
Parameters:
  `entityName` - the name of the entity
Throws:
  `SAXException`
See Also:
  `ExtendedContentHandler.entityReference(java.lang.String)`

#### getNamespaceMappings

    public NamespaceMappings getNamespaceMappings()

Description copied from interface: `ExtendedContentHandler`
This method returns an object that has the current namespace mappings in effect.

Specified by:
  `getNamespaceMappings` in interface `ExtendedContentHandler`
Returns:
  NamespaceMappings an object that has the current namespace mappings in effect.
See Also:
  `ExtendedContentHandler.getNamespaceMappings()`

#### getPrefix

    public java.lang.String getPrefix(java.lang.String uri)

Description copied from interface: `ExtendedContentHandler`
This method returns the prefix that currently maps to the given namespace URI.

Specified by:
  `getPrefix` in interface `ExtendedContentHandler`
Parameters:
  `uri` - the namespace URI
Returns:
  String the prefix that currently maps to the given URI.
See Also:
  `ExtendedContentHandler.getPrefix(java.lang.String)`

#### getNamespaceURI

    public java.lang.String getNamespaceURI(java.lang.String name,
                                   boolean isElement)

Description copied from interface: `ExtendedContentHandler`
This method gets the prefix associated with a current element or attribute name.

Specified by:
  `getNamespaceURI` in interface `ExtendedContentHandler`
Parameters:
  `name` - the qualified name of an element, or attribute
  `isElement` - true if it is an element name, false if it is an atttribute name
Returns:
  String the namespace URI associated with the element or attribute.
See Also:
  `ExtendedContentHandler.getNamespaceURI(java.lang.String, boolean)`

#### getNamespaceURIFromPrefix

    public java.lang.String getNamespaceURIFromPrefix(java.lang.String prefix)

Description copied from interface: `ExtendedContentHandler`
This method returns the namespace URI currently associated with the prefix.

Specified by:
  `getNamespaceURIFromPrefix` in interface `ExtendedContentHandler`
Parameters:
  `prefix` - a prefix of an element or attribute.
Returns:
  String the namespace URI currently associated with the prefix.
See Also:
  `ExtendedContentHandler.getNamespaceURIFromPrefix(java.lang.String)`

#### setDocumentLocator

    public void setDocumentLocator(Locator arg0)

Description copied from interface: `ContentHandler`
Receive an object for locating the origin of SAX document events.

SAX parsers are strongly encouraged (though not absolutely required) to supply a locator: if it does so, it must supply the locator to the application by invoking this method before invoking any of the other methods in the ContentHandler interface.

The locator allows the application to determine the end position of any document-related event, even if the parser is not reporting an error. Typically, the application will use this information for reporting its own errors (such as character content that does not match an application's business rules). The information returned by the locator is probably not sufficient for use with a search engine.

Note that the locator will return correct information only during the invocation SAX event callbacks after `startDocument` returns and before `endDocument` is called. The application should not attempt to use it at any other time.

Specified by:
  `setDocumentLocator` in interface `ContentHandler`
Parameters:
  `arg0` - an object that can return the location of any SAX document event
See Also:
  `ContentHandler.setDocumentLocator(org.xml.sax.Locator)`

#### endDocument

    public void endDocument()
                     throws SAXException

Description copied from interface: `ContentHandler`
Receive notification of the end of a document.

There is an apparent contradiction between the documentation for this method and the documentation for `ErrorHandler.fatalError(org.xml.sax.SAXParseException)`. Until this ambiguity is resolved in a future major release, clients should make no assumptions about whether endDocument() will or will not be invoked when the parser has reported a fatalError() or thrown an exception.

The SAX parser will invoke this method only once, and it will be the last method invoked during the parse. The parser shall not invoke this method until it has either abandoned parsing (because of an unrecoverable error) or reached the end of input.

Specified by:
  `endDocument` in interface `ContentHandler`
Throws:
  `SAXException` - any SAX exception, possibly wrapping another exception
See Also:
  `ContentHandler.endDocument()`

#### startPrefixMapping

    public void startPrefixMapping(java.lang.String arg0,
                          java.lang.String arg1)
                            throws SAXException

Description copied from interface: `ContentHandler`
Begin the scope of a prefix-URI Namespace mapping.

The information from this event is not necessary for normal Namespace processing: the SAX XML reader will automatically replace prefixes for element and attribute names when the `http://xml.org/sax/features/namespaces` feature is true (the default).

There are cases, however, when applications need to use prefixes in character data or in attribute values, where they cannot safely be expanded automatically; the start/endPrefixMapping event supplies the information to the application to expand prefixes in those contexts itself, if necessary.

Note that start/endPrefixMapping events are not guaranteed to be properly nested relative to each other: all startPrefixMapping events will occur immediately before the corresponding `startElement` event, and all `endPrefixMapping` events will occur immediately after the corresponding `endElement` event, but their order is not otherwise guaranteed.

There should never be start/endPrefixMapping events for the "xml" prefix, since it is predeclared and immutable.

Specified by:
  `startPrefixMapping` in interface `ContentHandler`
Parameters:
  `arg0` - the Namespace prefix being declared. An empty string is used for the default element namespace, which has no prefix.
  `arg1` - the Namespace URI the prefix is mapped to
Throws:
  `SAXException` - the client may throw an exception during processing
See Also:
  `ContentHandler.startPrefixMapping(java.lang.String, java.lang.String)`

#### endPrefixMapping

    public void endPrefixMapping(java.lang.String arg0)
                          throws SAXException

Description copied from interface: `ContentHandler`
End the scope of a prefix-URI mapping.

See `startPrefixMapping` for details. These events will always occur immediately after the corresponding `endElement` event, but the order of `endPrefixMapping` events is not otherwise guaranteed.

Specified by:
  `endPrefixMapping` in interface `ContentHandler`
Parameters:
  `arg0` - the prefix that was being mapped. This is the empty string when a default mapping scope ends.
Throws:
  `SAXException` - the client may throw an exception during processing
See Also:
  `ContentHandler.endPrefixMapping(java.lang.String)`

#### startElement

    public void startElement(java.lang.String arg0,
                    java.lang.String arg1,
                    java.lang.String arg2,
                    Attributes arg3)
                      throws SAXException

Description copied from interface: `ContentHandler`
Receive notification of the beginning of an element.

The Parser will invoke this method at the beginning of every element in the XML document; there will be a corresponding `endElement` event for every startElement event (even when the element is empty). All of the element's content will be reported, in order, before the corresponding endElement event.

This event allows up to three name components for each element:

1. the Namespace URI;
2. the local name; and
3. the qualified (prefixed) name.

Any or all of these may be provided, depending on the values of the http://xml.org/sax/features/namespaces and the http://xml.org/sax/features/namespace-prefixes properties:

- the Namespace URI and local name are required when the namespaces property is true (the default), and are optional when the namespaces property is false (if one is specified, both must be);
- the qualified name is required when the namespace-prefixes property is true, and is optional when the namespace-prefixes property is false (the default).

Note that the attribute list provided will contain only attributes with explicit values (specified or defaulted): #IMPLIED attributes will be omitted. The attribute list will contain attributes used for Namespace declarations (xmlns* attributes) only if the `http://xml.org/sax/features/namespace-prefixes` property is true (it is false by default, and support for a true value is optional).

Like `characters()`, attribute values may have characters that need more than one `char` value.

Specified by:
  `startElement` in interface `ContentHandler`
Parameters:
  `arg0` - the Namespace URI, or the empty string if the element has no Namespace URI or if Namespace processing is not being performed
  `arg1` - the local name (without prefix), or the empty string if Namespace processing is not being performed
  `arg2` - the qualified name (with prefix), or the empty string if qualified names are not available
  `arg3` - the attributes attached to the element. If there are no attributes, it shall be an empty Attributes object. The value of this object after startElement returns is undefined
Throws:
  `SAXException` - any SAX exception, possibly wrapping another exception
See Also:
  `ContentHandler.startElement(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes)`

#### endElement

    public void endElement(java.lang.String arg0,
                  java.lang.String arg1,
                  java.lang.String arg2)
                    throws SAXException

Description copied from interface: `ContentHandler`
Receive notification of the end of an element.

The SAX parser will invoke this method at the end of every element in the XML document; there will be a corresponding `startElement` event for every endElement event (even when the element is empty).

For information on the names, see startElement.

Specified by:
  `endElement` in interface `ContentHandler`
Parameters:
  `arg0` - the Namespace URI, or the empty string if the element has no Namespace URI or if Namespace processing is not being performed
  `arg1` - the local name (without prefix), or the empty string if Namespace processing is not being performed
  `arg2` - the qualified XML name (with prefix), or the empty string if qualified names are not available
Throws:
  `SAXException` - any SAX exception, possibly wrapping another exception
See Also:
  `ContentHandler.endElement(java.lang.String, java.lang.String, java.lang.String)`

#### characters

    public void characters(char[] arg0,
                  int arg1,
                  int arg2)
                    throws SAXException

Description copied from interface: `ContentHandler`
Receive notification of character data.

The Parser will call this method to report each chunk of character data. SAX parsers may return all contiguous character data in a single chunk, or they may split it into several chunks; however, all of the characters in any single event must come from the same external entity so that the Locator provides useful information.

The application must not attempt to read from the array outside of the specified range.

Individual characters may consist of more than one Java `char` value. There are two important cases where this happens, because characters can't be represented in just sixteen bits. In one case, characters are represented in a Surrogate Pair, using two special Unicode values. Such characters are in the so-called "Astral Planes", with a code point above U+FFFF. A second case involves composite characters, such as a base character combining with one or more accent characters.

Your code should not assume that algorithms using `char`-at-a-time idioms will be working in character units; in some cases they will split characters. This is relevant wherever XML permits arbitrary characters, such as attribute values, processing instruction data, and comments as well as in data reported from this method. It's also generally relevant whenever Java code manipulates internationalized text; the issue isn't unique to XML.

Note that some parsers will report whitespace in element content using the `ignorableWhitespace` method rather than this one (validating parsers must do so).

Specified by:
  `characters` in interface `ContentHandler`
Parameters:
  `arg0` - the characters from the XML document
  `arg1` - the start position in the array
  `arg2` - the number of characters to read from the array
Throws:
  `SAXException` - any SAX exception, possibly wrapping another exception
See Also:
  `ContentHandler.characters(char[], int, int)`

#### ignorableWhitespace

    public void ignorableWhitespace(char[] arg0,
                           int arg1,
                           int arg2)
                             throws SAXException

Description copied from interface: `ContentHandler`
Receive notification of ignorable whitespace in element content.

Validating Parsers must use this method to report each chunk of whitespace in element content (see the W3C XML 1.0 recommendation, section 2.10): non-validating parsers may also use this method if they are capable of parsing and using content models.

SAX parsers may return all contiguous whitespace in a single chunk, or they may split it into several chunks; however, all of the characters in any single event must come from the same external entity, so that the Locator provides useful information.

The application must not attempt to read from the array outside of the specified range.

Specified by:
  `ignorableWhitespace` in interface `ContentHandler`
Parameters:
  `arg0` - the characters from the XML document
  `arg1` - the start position in the array
  `arg2` - the number of characters to read from the array
Throws:
  `SAXException` - any SAX exception, possibly wrapping another exception
See Also:
  `ContentHandler.ignorableWhitespace(char[], int, int)`

#### processingInstruction

    public void processingInstruction(java.lang.String arg0,
                             java.lang.String arg1)
                               throws SAXException

Description copied from interface: `ContentHandler`
Receive notification of a processing instruction.

The Parser will invoke this method once for each processing instruction found: note that processing instructions may occur before or after the main document element.

A SAX parser must never report an XML declaration (XML 1.0, section 2.8) or a text declaration (XML 1.0, section 4.3.1) using this method.

Like `characters()`, processing instruction data may have characters that need more than one `char` value.

Specified by:
  `processingInstruction` in interface `ContentHandler`
Parameters:
  `arg0` - the processing instruction target
  `arg1` - the processing instruction data, or null if none was supplied. The data does not include any whitespace separating it from the target
Throws:
  `SAXException` - any SAX exception, possibly wrapping another exception
See Also:
  `ContentHandler.processingInstruction(java.lang.String, java.lang.String)`

#### skippedEntity

    public void skippedEntity(java.lang.String arg0)
                       throws SAXException

Description copied from interface: `ContentHandler`
Receive notification of a skipped entity. This is not called for entity references within markup constructs such as element start tags or markup declarations. (The XML recommendation requires reporting skipped external entities. SAX also reports internal entity expansion/non-expansion, except within markup constructs.)

The Parser will invoke this method each time the entity is skipped. Non-validating processors may skip entities if they have not seen the declarations (because, for example, the entity was declared in an external DTD subset). All processors may skip external entities, depending on the values of the `http://xml.org/sax/features/external-general-entities` and the `http://xml.org/sax/features/external-parameter-entities` properties.

Specified by:
  `skippedEntity` in interface `ContentHandler`
Parameters:
  `arg0` - the name of the skipped entity. If it is a parameter entity, the name will begin with '%', and if it is the external DTD subset, it will be the string "[dtd]"
Throws:
  `SAXException` - any SAX exception, possibly wrapping another exception
See Also:
  `ContentHandler.skippedEntity(java.lang.String)`

#### comment

    public void comment(java.lang.String comment)
                 throws SAXException

Description copied from interface: `ExtendedLexicalHandler`
This method is used to notify of a comment

Specified by:
  `comment` in interface `ExtendedLexicalHandler`
Parameters:
  `comment` - the comment, but unlike the SAX comment() method this method takes a String rather than a character array.
Throws:
  `SAXException`
See Also:
  `ExtendedLexicalHandler.comment(java.lang.String)`

#### startDTD

    public void startDTD(java.lang.String arg0,
                java.lang.String arg1,
                java.lang.String arg2)
                  throws SAXException

Description copied from interface: `LexicalHandler`
Report the start of DTD declarations, if any.

This method is intended to report the beginning of the DOCTYPE declaration; if the document has no DOCTYPE declaration, this method will not be invoked.

All declarations reported through `DTDHandler` or `DeclHandler` events must appear between the startDTD and `endDTD` events. Declarations are assumed to belong to the internal DTD subset unless they appear between `startEntity` and `endEntity` events. Comments and processing instructions from the DTD should also be reported between the startDTD and endDTD events, in their original order of (logical) occurrence; they are not required to appear in their correct locations relative to DTDHandler or DeclHandler events, however.

Note that the start/endDTD events will appear within the start/endDocument events from ContentHandler and before the first `startElement` event.

Specified by:
  `startDTD` in interface `LexicalHandler`
Parameters:
  `arg0` - The document type name.
  `arg1` - The declared public identifier for the external DTD subset, or null if none was declared.
  `arg2` - The declared system identifier for the external DTD subset, or null if none was declared. (Note that this is not resolved against the document base URI.)
Throws:
  `SAXException` - The application may raise an exception.
See Also:
  `LexicalHandler.startDTD(java.lang.String, java.lang.String, java.lang.String)`

#### endDTD

    public void endDTD()
                throws SAXException

Description copied from interface: `LexicalHandler`
Report the end of DTD declarations.

This method is intended to report the end of the DOCTYPE declaration; if the document has no DOCTYPE declaration, this method will not be invoked.

Specified by:
  `endDTD` in interface `LexicalHandler`
Throws:
  `SAXException` - The application may raise an exception.
See Also:
  `LexicalHandler.endDTD()`

#### startEntity

    public void startEntity(java.lang.String arg0)
                     throws SAXException

Description copied from interface: `LexicalHandler`
Report the beginning of some internal and external XML entities.

The reporting of parameter entities (including the external DTD subset) is optional, and SAX2 drivers that report LexicalHandler events may not implement it; you can use the `http://xml.org/sax/features/lexical-handler/parameter-entities` feature to query or control the reporting of parameter entities.

General entities are reported with their regular names, parameter entities have '%' prepended to their names, and the external DTD subset has the pseudo-entity name "[dtd]".

When a SAX2 driver is providing these events, all other events must be properly nested within start/end entity events. There is no additional requirement that events from `DeclHandler` or `DTDHandler` be properly ordered.

Note that skipped entities will be reported through the `skippedEntity` event, which is part of the ContentHandler interface.

Because of the streaming event model that SAX uses, some entity boundaries cannot be reported under any circumstances:

- general entities within attribute values
- parameter entities within declarations

These will be silently expanded, with no indication of where the original entity boundaries were.

Note also that the boundaries of character references (which are not really entities anyway) are not reported.

All start/endEntity events must be properly nested.

Specified by:
  `startEntity` in interface `LexicalHandler`
Parameters:
  `arg0` - The name of the entity. If it is a parameter entity, the name will begin with '%', and if it is the external DTD subset, it will be "[dtd]".
Throws:
  `SAXException` - The application may raise an exception.
See Also:
  `LexicalHandler.startEntity(java.lang.String)`

#### endEntity

    public void endEntity(java.lang.String arg0)
                   throws SAXException

Description copied from interface: `LexicalHandler`
Report the end of an entity.

Specified by:
  `endEntity` in interface `LexicalHandler`
Parameters:
  `arg0` - The name of the entity that is ending.
Throws:
  `SAXException` - The application may raise an exception.
See Also:
  `LexicalHandler.endEntity(java.lang.String)`

#### startCDATA

    public void startCDATA()
                    throws SAXException

Description copied from interface: `LexicalHandler`
Report the start of a CDATA section.

The contents of the CDATA section will be reported through the regular `characters` event; this event is intended only to report the boundary.

Specified by:
  `startCDATA` in interface `LexicalHandler`
Throws:
  `SAXException` - The application may raise an exception.
See Also:
  `LexicalHandler.startCDATA()`

#### endCDATA

    public void endCDATA()
                  throws SAXException

Description copied from interface: `LexicalHandler`
Report the end of a CDATA section.

Specified by:
  `endCDATA` in interface `LexicalHandler`
Throws:
  `SAXException` - The application may raise an exception.
See Also:
  `LexicalHandler.endCDATA()`

#### comment

    public void comment(char[] arg0,
               int arg1,
               int arg2)
                 throws SAXException

Description copied from interface: `LexicalHandler`
Report an XML comment anywhere in the document.

This callback will be used for comments inside or outside the document element, including comments in the external DTD subset (if read). Comments in the DTD must be properly nested inside start/endDTD and start/endEntity events (if used).

Specified by:
  `comment` in interface `LexicalHandler`
Parameters:
  `arg0` - An array holding the characters in the comment.
  `arg1` - The starting position in the array.
  `arg2` - The number of characters to use from the array.
Throws:
  `SAXException` - The application may raise an exception.
See Also:
  `LexicalHandler.comment(char[], int, int)`

#### getDoctypePublic

    public java.lang.String getDoctypePublic()

Returns the previously set value of the value to be used as the public identifier in the document type declaration (DTD).

Returns:
  the public identifier to be used in the DOCTYPE declaration in the output document.
See Also:
  `XSLOutputAttributes.getDoctypePublic()`

#### getDoctypeSystem

    public java.lang.String getDoctypeSystem()

Returns the previously set value of the value to be used as the system identifier in the document type declaration (DTD).

Returns:
  the system identifier to be used in the DOCTYPE declaration in the output document.
See Also:
  `XSLOutputAttributes.getDoctypeSystem()`

#### getEncoding

    public java.lang.String getEncoding()

Returns:
  the character encoding to be used in the output document.
See Also:
  `XSLOutputAttributes.getEncoding()`

#### getIndent

    public boolean getIndent()

Returns:
  true if the output document should be indented to visually indicate its structure.
See Also:
  `XSLOutputAttributes.getIndent()`

#### getIndentAmount

    public int getIndentAmount()

Returns:
  the number of spaces to indent for each indentation level.
See Also:
  `XSLOutputAttributes.getIndentAmount()`

#### getMediaType

    public java.lang.String getMediaType()

Returns:
  the mediatype the media-type or MIME type associated with the output document.
See Also:
  `XSLOutputAttributes.getMediaType()`

#### getOmitXMLDeclaration

    public boolean getOmitXMLDeclaration()

Returns:
  true if the XML declaration is to be omitted from the output document.
See Also:
  `XSLOutputAttributes.getOmitXMLDeclaration()`

#### getStandalone

    public java.lang.String getStandalone()

Returns:
  a value of "yes" if the `standalone` delaration is to be included in the output document.
See Also:
  `XSLOutputAttributes.getStandalone()`

#### getVersion

    public java.lang.String getVersion()

Returns:
  the version of the output format.
See Also:
  `XSLOutputAttributes.getVersion()`

#### setCdataSectionElements

    public void setCdataSectionElements(java.util.Hashtable h)
                                 throws java.lang.Exception

Throws:
  `java.lang.Exception`
See Also:
  `XSLOutputAttributes.setCdataSectionElements(java.util.Vector)`

#### setDoctype

    public void setDoctype(java.lang.String system,
                  java.lang.String pub)

Set the value coming from the xsl:output doctype-public and doctype-system stylesheet properties

Parameters:
  `system` - the system identifier to be used in the DOCTYPE declaration in the output document.
  `pub` - the public identifier to be used in the DOCTYPE declaration in the output document.
See Also:
  `XSLOutputAttributes.setDoctype(java.lang.String, java.lang.String)`

#### setDoctypePublic

    public void setDoctypePublic(java.lang.String doctype)

Set the value coming from the xsl:output doctype-public stylesheet attribute.

Parameters:
  `doctype` - the public identifier to be used in the DOCTYPE declaration in the output document.
See Also:
  `XSLOutputAttributes.setDoctypePublic(java.lang.String)`

#### setDoctypeSystem

    public void setDoctypeSystem(java.lang.String doctype)

Set the value coming from the xsl:output doctype-system stylesheet attribute.

Parameters:
  `doctype` - the system identifier to be used in the DOCTYPE declaration in the output document.
See Also:
  `XSLOutputAttributes.setDoctypeSystem(java.lang.String)`

#### setEncoding

    public void setEncoding(java.lang.String encoding)

Sets the character encoding coming from the xsl:output encoding stylesheet attribute.

Parameters:
  `encoding` - the character encoding
See Also:
  `XSLOutputAttributes.setEncoding(java.lang.String)`

#### setMediaType

    public void setMediaType(java.lang.String mediatype)

Sets the value coming from the xsl:output media-type stylesheet attribute.

Parameters:
  `mediatype` - the media-type or MIME type associated with the output document.
See Also:
  `XSLOutputAttributes.setMediaType(java.lang.String)`

#### setOmitXMLDeclaration

    public void setOmitXMLDeclaration(boolean b)

Sets the value coming from the xsl:output omit-xml-declaration stylesheet attribute

Parameters:
  `b` - true if the XML declaration is to be omitted from the output document.
See Also:
  `XSLOutputAttributes.setOmitXMLDeclaration(boolean)`

#### setStandalone

    public void setStandalone(java.lang.String standalone)

Sets the value coming from the xsl:output standalone stylesheet attribute.

Parameters:
  `standalone` - a value of "yes" indicates that the `standalone` delaration is to be included in the output document.
See Also:
  `XSLOutputAttributes.setStandalone(java.lang.String)`

#### elementDecl

    public void elementDecl(java.lang.String arg0,
                   java.lang.String arg1)
                     throws SAXException

Description copied from interface: `DeclHandler`
Report an element type declaration.

The content model will consist of the string "EMPTY", the string "ANY", or a parenthesised group, optionally followed by an occurrence indicator. The model will be normalized so that all parameter entities are fully resolved and all whitespace is removed,and will include the enclosing parentheses. Other normalization (such as removing redundant parentheses or simplifying occurrence indicators) is at the discretion of the parser.

Specified by:
  `elementDecl` in interface `DeclHandler`
Parameters:
  `arg0` - The element type name.
  `arg1` - The content model as a normalized string.
Throws:
  `SAXException` - The application may raise an exception.
See Also:
  `DeclHandler.elementDecl(java.lang.String, java.lang.String)`

#### attributeDecl

    public void attributeDecl(java.lang.String arg0,
                     java.lang.String arg1,
                     java.lang.String arg2,
                     java.lang.String arg3,
                     java.lang.String arg4)
                       throws SAXException

Description copied from interface: `DeclHandler`
Report an attribute type declaration.

Only the effective (first) declaration for an attribute will be reported. The type will be one of the strings "CDATA", "ID", "IDREF", "IDREFS", "NMTOKEN", "NMTOKENS", "ENTITY", "ENTITIES", a parenthesized token group with the separator "|" and all whitespace removed, or the word "NOTATION" followed by a space followed by a parenthesized token group with all whitespace removed.

The value will be the value as reported to applications, appropriately normalized and with entity and character references expanded.

Specified by:
  `attributeDecl` in interface `DeclHandler`
Parameters:
  `arg0` - The name of the associated element.
  `arg1` - The name of the attribute.
  `arg2` - A string representing the attribute type.
  `arg3` - A string representing the attribute defaulting mode ("#IMPLIED", "#REQUIRED", or "#FIXED") or null if none of these applies.
  `arg4` - A string representing the attribute's default value, or null if there is none.
Throws:
  `SAXException` - The application may raise an exception.
See Also:
  `DeclHandler.attributeDecl(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String)`

#### internalEntityDecl

    public void internalEntityDecl(java.lang.String arg0,
                          java.lang.String arg1)
                            throws SAXException

Description copied from interface: `DeclHandler`
Report an internal entity declaration.

Only the effective (first) declaration for each entity will be reported. All parameter entities in the value will be expanded, but general entities will not.

Specified by:
  `internalEntityDecl` in interface `DeclHandler`
Parameters:
  `arg0` - The name of the entity. If it is a parameter entity, the name will begin with '%'.
  `arg1` - The replacement text of the entity.
Throws:
  `SAXException` - The application may raise an exception.
See Also:
  `DeclHandler.internalEntityDecl(java.lang.String, java.lang.String)`

#### externalEntityDecl

    public void externalEntityDecl(java.lang.String arg0,
                          java.lang.String arg1,
                          java.lang.String arg2)
                            throws SAXException

Description copied from interface: `DeclHandler`
Report a parsed external entity declaration.

Only the effective (first) declaration for each entity will be reported.

If the system identifier is a URL, the parser must resolve it fully before passing it to the application.

Specified by:
  `externalEntityDecl` in interface `DeclHandler`
Parameters:
  `arg0` - The name of the entity. If it is a parameter entity, the name will begin with '%'.
  `arg1` - The entity's public identifier, or null if none was given.
  `arg2` - The entity's system identifier.
Throws:
  `SAXException` - The application may raise an exception.
See Also:
  `DeclHandler.externalEntityDecl(java.lang.String, java.lang.String, java.lang.String)`

#### warning

    public void warning(SAXParseException arg0)
                 throws SAXException

Description copied from interface: `ErrorHandler`
Receive notification of a warning.

SAX parsers will use this method to report conditions that are not errors or fatal errors as defined by the XML recommendation. The default behaviour is to take no action.

The SAX parser must continue to provide normal parsing events after invoking this method: it should still be possible for the application to process the document through to the end.

Filters may use this method to report other, non-XML warnings as well.

Specified by:
  `warning` in interface `ErrorHandler`
Parameters:
  `arg0` - The warning information encapsulated in a SAX parse exception.
Throws:
  `SAXException` - Any SAX exception, possibly wrapping another exception.
See Also:
  `ErrorHandler.warning(org.xml.sax.SAXParseException)`

#### error

    public void error(SAXParseException arg0)
               throws SAXException

Description copied from interface: `ErrorHandler`
Receive notification of a recoverable error.

This corresponds to the definition of "error" in section 1.2 of the W3C XML 1.0 Recommendation. For example, a validating parser would use this callback to report the violation of a validity constraint. The default behaviour is to take no action.

The SAX parser must continue to provide normal parsing events after invoking this method: it should still be possible for the application to process the document through to the end. If the application cannot do so, then the parser should report a fatal error even if the XML recommendation does not require it to do so.

Filters may use this method to report other, non-XML errors as well.

Specified by:
  `error` in interface `ErrorHandler`
Parameters:
  `arg0` - The error information encapsulated in a SAX parse exception.
Throws:
  `SAXException` - Any SAX exception, possibly wrapping another exception.
See Also:
  `ErrorHandler.error(org.xml.sax.SAXParseException)`

#### fatalError

    public void fatalError(SAXParseException arg0)
                    throws SAXException

Description copied from interface: `ErrorHandler`
Receive notification of a non-recoverable error.

There is an apparent contradiction between the documentation for this method and the documentation for `ContentHandler.endDocument()`. Until this ambiguity is resolved in a future major release, clients should make no assumptions about whether endDocument() will or will not be invoked when the parser has reported a fatalError() or thrown an exception.

This corresponds to the definition of "fatal error" in section 1.2 of the W3C XML 1.0 Recommendation. For example, a parser would use this callback to report the violation of a well-formedness constraint.

The application must assume that the document is unusable after the parser has invoked this method, and should continue (if at all) only for the sake of collecting additional error messages: in fact, SAX parsers are free to stop reporting any other events once this method has been invoked.

Specified by:
  `fatalError` in interface `ErrorHandler`
Parameters:
  `arg0` - The error information encapsulated in a SAX parse exception.
Throws:
  `SAXException` - Any SAX exception, possibly wrapping another exception.
See Also:
  `ErrorHandler.fatalError(org.xml.sax.SAXParseException)`

#### asDOMSerializer

    public DOMSerializer asDOMSerializer()
                                  throws java.io.IOException

Description copied from interface: `Serializer`
Return a `DOMSerializer` interface into this serializer. Through the returned object the document to be serialized, a DOM, can be provided to the serializer. If the serializer does not support the `DOMSerializer` interface, it should return null.

In principle only one of asDOMSerializer() or asContentHander() should be called.

Specified by:
  `asDOMSerializer` in interface `Serializer`
Returns:
  A `DOMSerializer` interface into this serializer, or null if the serializer is not DOM capable
Throws:
  `java.io.IOException` - An I/O exception occured
See Also:
  `Serializer.asDOMSerializer()`

#### setNamespaceMappings

    public void setNamespaceMappings(NamespaceMappings mappings)

Description copied from interface: `SerializationHandler`
Used only by TransformerSnapshotImpl to restore the serialization to a previous state.

Specified by:
  `setNamespaceMappings` in interface `SerializationHandler`
Parameters:
  `mappings` - NamespaceMappings
See Also:
  `SerializationHandler.setNamespaceMappings(NamespaceMappings)`

#### setSourceLocator

    public void setSourceLocator(SourceLocator locator)

Description copied from interface: `ExtendedContentHandler`
This method is used to set the source locator, which might be used to generated an error message.

Specified by:
  `setSourceLocator` in interface `ExtendedContentHandler`
Parameters:
  `locator` - the source locator
See Also:
  `ExtendedContentHandler.setSourceLocator(javax.xml.transform.SourceLocator)`

#### addUniqueAttribute

    public void addUniqueAttribute(java.lang.String name,
                          java.lang.String value,
                          int flags)
                            throws SAXException

Description copied from interface: `ExtendedContentHandler`
Add a unique attribute to the current element. The attribute is guaranteed to be unique here. The serializer can write it out immediately without saving it in a table first. The integer flag contains information about the attribute, which helps the serializer to decide whether a particular processing is needed.

Specified by:
  `addUniqueAttribute` in interface `ExtendedContentHandler`
Parameters:
  `name` - the fully qualified attribute name.
  `value` - the attribute value
  `flags` - a bitwise flag
Throws:
  `SAXException`
See Also:
  `ExtendedContentHandler.addUniqueAttribute(java.lang.String, java.lang.String, int)`

#### characters

    public void characters(Node node)
                    throws SAXException

Description copied from interface: `ExtendedContentHandler`
This method is used to notify of a character event, but passing the data as a DOM Node rather than the standard character array.

Specified by:
  `characters` in interface `ExtendedContentHandler`
Parameters:
  `node` - a DOM Node containing text.
Throws:
  `SAXException`
See Also:
  `ExtendedContentHandler.characters(org.w3c.dom.Node)`

#### addXSLAttribute

    public void addXSLAttribute(java.lang.String qName,
                       java.lang.String value,
                       java.lang.String uri)

Description copied from interface: `ExtendedContentHandler`
Add an attribute from an xsl:attribute element.

Specified by:
  `addXSLAttribute` in interface `ExtendedContentHandler`
Parameters:
  `qName` - the qualified attribute name (prefix:localName)
  `value` - the attributes value
  `uri` - the uri that the prefix of the qName is mapped to.
See Also:
  `ExtendedContentHandler.addXSLAttribute(java.lang.String, java.lang.String, java.lang.String)`

#### addAttribute

    public void addAttribute(java.lang.String uri,
                    java.lang.String localName,
                    java.lang.String rawName,
                    java.lang.String type,
                    java.lang.String value)
                      throws SAXException

Description copied from interface: `ExtendedContentHandler`
Add at attribute to the current element, not from an xsl:attribute element.

Specified by:
  `addAttribute` in interface `ExtendedContentHandler`
Parameters:
  `uri` - the namespace URI of the attribute name
  `localName` - the local name of the attribute (without prefix)
  `rawName` - the qualified name of the attribute
  `type` - the attribute type typically character data (CDATA)
  `value` - the value of the attribute
Throws:
  `SAXException`
See Also:
  `ExtendedContentHandler.addAttribute(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String)`

#### notationDecl

    public void notationDecl(java.lang.String arg0,
                    java.lang.String arg1,
                    java.lang.String arg2)
                      throws SAXException

Description copied from interface: `DTDHandler`
Receive notification of a notation declaration event.

It is up to the application to record the notation for later reference, if necessary; notations may appear as attribute values and in unparsed entity declarations, and are sometime used with processing instruction target names.

At least one of publicId and systemId must be non-null. If a system identifier is present, and it is a URL, the SAX parser must resolve it fully before passing it to the application through this event.

There is no guarantee that the notation declaration will be reported before any unparsed entities that use it.

Specified by:
  `notationDecl` in interface `DTDHandler`
Parameters:
  `arg0` - The notation name.
  `arg1` - The notation's public identifier, or null if none was given.
  `arg2` - The notation's system identifier, or null if none was given.
Throws:
  `SAXException` - Any SAX exception, possibly wrapping another exception.
See Also:
  `DTDHandler.notationDecl(java.lang.String, java.lang.String, java.lang.String)`

#### unparsedEntityDecl

    public void unparsedEntityDecl(java.lang.String arg0,
                          java.lang.String arg1,
                          java.lang.String arg2,
                          java.lang.String arg3)
                            throws SAXException

Description copied from interface: `DTDHandler`
Receive notification of an unparsed entity declaration event.

Note that the notation name corresponds to a notation reported by the `notationDecl` event. It is up to the application to record the entity for later reference, if necessary; unparsed entities may appear as attribute values.

If the system identifier is a URL, the parser must resolve it fully before passing it to the application.

Specified by:
  `unparsedEntityDecl` in interface `DTDHandler`
Parameters:
  `arg0` - The unparsed entity's name.
  `arg1` - The entity's public identifier, or null if none was given.
  `arg2` - The entity's system identifier.
  `arg3` - The name of the associated notation.
Throws:
  `SAXException` - Any SAX exception, possibly wrapping another exception.
See Also:
  `DTDHandler.unparsedEntityDecl(java.lang.String, java.lang.String, java.lang.String, java.lang.String)`

#### setDTDEntityExpansion

    public void setDTDEntityExpansion(boolean expand)

Description copied from interface: `SerializationHandler`
Default behavior is to expand DTD entities, that is the initall default value is true.

Specified by:
  `setDTDEntityExpansion` in interface `SerializationHandler`
Parameters:
  `expand` - true if DTD entities are to be expanded, false if they are to be left as DTD entity references.
See Also:
  `SerializationHandler.setDTDEntityExpansion(boolean)`

#### getOutputProperty

    public java.lang.String getOutputProperty(java.lang.String name)

Get the value for a property that affects seraialization, if a property was set return that value, otherwise return the default value, otherwise return null.

Parameters:
  `name` - The name of the property, which is just the local name if it is in no namespace, but is the URI in curly braces followed by the local name if it is in a namespace, for example:
  - "encoding"
  - "method"
  - "{http://xml.apache.org/xalan}indent-amount"
  - "{http://xml.apache.org/xalan}line-separator"
Returns:
  The value of the parameter

#### getOutputPropertyDefault

    public java.lang.String getOutputPropertyDefault(java.lang.String name)

Get the default value for a property that affects seraialization, or null if there is none. It is possible that a non-default value was set for the property, however the value returned by this method is unaffected by any non-default settings.

Parameters:
  `name` - The name of the property.
Returns:
  The default value of the parameter, or null if there is no default value.

#### setOutputProperty

    public void setOutputProperty(java.lang.String name,
                         java.lang.String val)

Set the non-default value for a property that affects seraialization.

Parameters:
  `name` - The name of the property, which is just the local name if it is in no namespace, but is the URI in curly braces followed by the local name if it is in a namespace, for example:
  - "encoding"
  - "method"
  - "{http://xml.apache.org/xalan}indent-amount"
  - "{http://xml.apache.org/xalan}line-separator"

#### setOutputPropertyDefault

    public void setOutputPropertyDefault(java.lang.String name,
                                java.lang.String val)

Set the default value for a property that affects seraialization.

Parameters:
  `name` - The name of the property, which is just the local name if it is in no namespace, but is the URI in curly braces followed by the local name if it is in a namespace, for example:
  - "encoding"
  - "method"
  - "{http://xml.apache.org/xalan}indent-amount"
  - "{http://xml.apache.org/xalan}line-separator"

#### asDOM3Serializer

    public java.lang.Object asDOM3Serializer()
                                      throws java.io.IOException

Description copied from interface: `Serializer`
Return an Object into this serializer to be cast to a DOM3Serializer. Through the returned object the document to be serialized, a DOM (Level 3), can be provided to the serializer. If the serializer does not support casting to a `DOM3Serializer` interface, it should return null.

In principle only one of asDOM3Serializer() or asContentHander() should be called.

Specified by:
  `asDOM3Serializer` in interface `Serializer`
Returns:
  An Object to be cast to a DOM3Serializer interface into this serializer, or null if the serializer is not DOM capable
Throws:
  `java.io.IOException` - An I/O exception occured
See Also:
  `Serializer.asDOM3Serializer()`