org.apache.xml.serializer

Class ToUnknownStream

Implemented Interfaces:
org.xml.sax.ContentHandler, DeclHandler, org.xml.sax.DTDHandler, ErrorHandler, DOMSerializer, org.apache.xml.serializer.ExtendedContentHandler, org.apache.xml.serializer.ExtendedLexicalHandler, org.xml.sax.ext.LexicalHandler, SerializationHandler, Serializer, org.apache.xml.serializer.SerializerConstants, org.apache.xml.serializer.XSLOutputAttributes

public final class ToUnknownStream
extends SerializerBase

This class wraps another SerializationHandler. The wrapped object will either handler XML or HTML, which is not known until a little later when the first XML tag is seen. If the first tag is

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

HTML_ATTREMPTY, HTML_ATTRURL, NO_BAD_CHARS

Fields inherited from interface org.apache.xml.serializer.SerializerConstants

CDATA_CONTINUE, CDATA_DELIMITER_CLOSE, CDATA_DELIMITER_OPEN, DEFAULT_SAX_SERIALIZER, EMPTYSTRING, ENTITY_AMP, ENTITY_CRLF, ENTITY_GT, ENTITY_LT, ENTITY_QUOT, XMLNS_PREFIX, XMLNS_URI, XMLVERSION10, XMLVERSION11, XML_PREFIX

Constructor Summary

ToUnknownStream()
Default constructor.

Method Summary

void
addAttribute(String rawName, String value)
Adds an attribute to the currenly open tag
void
addAttribute(String uri, String localName, String rawName, String type, String value, boolean XSLAttribute)
Adds an attribute to the currenly open tag
void
addAttributes(Attributes atts)
void
addUniqueAttribute(String rawName, String value, int flags)
Adds a unique attribute to the currenly open tag
ContentHandler
asContentHandler()
DOMSerializer
asDOMSerializer()
void
attributeDecl(String arg0, String arg1, String arg2, String arg3, String arg4)
Pass the call on to the underlying handler
void
characters(String chars)
Converts the String to a character array and calls the SAX method characters(char[],int,int);
void
characters(char[] characters, int offset, int length)
Pass the call on to the underlying handler
void
close()
void
comment(String comment)
Pass the call on to the underlying handler
void
comment(char[] ch, int start, int length)
Pass the call on to the underlying handler
void
elementDecl(String arg0, String arg1)
Pass the call on to the underlying handler
void
endCDATA()
Pass the call on to the underlying handler
void
endDTD()
Pass the call on to the underlying handler
void
endDocument()
Pass the call on to the underlying handler
void
endElement(String elementName)
Pass the call on to the underlying handler
void
endElement(String namespaceURI, String localName, String qName)
Pass the call on to the underlying handler
void
endEntity(String name)
Pass the call on to the underlying handler
void
endPrefixMapping(String prefix)
Pass the call on to the underlying handler
void
entityReference(String entityName)
void
externalEntityDecl(String name, String publicId, String systemId)
Pass the call on to the underlying handler
void
flushPending()
String
getDoctypePublic()
Pass the call on to the underlying handler
String
getDoctypeSystem()
Pass the call on to the underlying handler
String
getEncoding()
Pass the call on to the underlying handler
boolean
getIndent()
Pass the call on to the underlying handler
int
getIndentAmount()
Pass the call on to the underlying handler
String
getMediaType()
Pass the call on to the underlying handler
NamespaceMappings
getNamespaceMappings()
Get the current namespace mappings.
String
getNamespaceURI(String qname, boolean isElement)
String
getNamespaceURIFromPrefix(String prefix)
Returns the URI of prefix (if any)
boolean
getOmitXMLDeclaration()
Pass the call on to the underlying handler
Properties
getOutputFormat()
OutputStream
getOutputStream()
String
getPrefix(String namespaceURI)
String
getStandalone()
Pass the call on to the underlying handler
Transformer
getTransformer()
Gets the transformer associated with this serializer
String
getVersion()
Pass the call on to the underlying handler
Writer
getWriter()
void
ignorableWhitespace(char[] ch, int start, int length)
Pass the call on to the underlying handler
void
internalEntityDecl(String arg0, String arg1)
Pass the call on to the underlying handler
void
namespaceAfterStartElement(String prefix, String uri)
This method is used when a prefix/uri namespace mapping is indicated after the element was started with a startElement() and before and endElement().
void
processingInstruction(String target, String data)
Pass the call on to the underlying handler
boolean
reset()
passes the call on to the underlying HTML or XML handler
void
serialize(Node node)
Converts the DOM node to output
void
setCdataSectionElements(Vector URI_and_localNames)
void
setContentHandler(ContentHandler ch)
void
setDoctype(String system, String pub)
void
setDoctypePublic(String doctype)
Set the doctype in the underlying XML handler.
void
setDoctypeSystem(String doctype)
Set the doctype in the underlying XML handler.
void
setDocumentLocator(Locator locator)
Pass the call on to the underlying handler
void
setEncoding(String encoding)
Pass the call on to the underlying handler
boolean
setEscaping(boolean escape)
void
setIndent(boolean indent)
Pass the call on to the underlying handler
void
setIndentAmount(int value)
Pass the call on to the underlying handler
void
setMediaType(String mediaType)
void
setOmitXMLDeclaration(boolean b)
Pass the call on to the underlying handler
void
setOutputFormat(Properties format)
Set the properties of the handler
void
setOutputStream(OutputStream output)
Sets the output stream to write to
void
setSourceLocator(SourceLocator locator)
This method is used to set the source locator, which might be used to generated an error message.
void
setStandalone(String standalone)
Pass the call on to the underlying handler
void
setTransformer(Transformer t)
Sets the transformer associated with this serializer
void
setVersion(String version)
This method cannot be cached because default is different in HTML and XML (we need more than a boolean).
void
setWriter(Writer writer)
Sets the writer to write to
void
skippedEntity(String name)
Pass the call on to the underlying handler
void
startCDATA()
Pass the call on to the underlying handler
void
startDTD(String name, String publicId, String systemId)
Pass the call on to the underlying handler
void
startDocument()
void
startElement(String qName)
This method is used to notify of the start of an element
void
startElement(String namespaceURI, String localName, String qName)
This method is used to notify that an element is starting.
void
startElement(String namespaceURI, String localName, String elementName, Attributes atts)
void
startEntity(String name)
Pass the call on to the underlying handler
void
startPrefixMapping(String prefix, String uri)
boolean
startPrefixMapping(String prefix, 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.

Methods inherited from class org.apache.xml.serializer.SerializerBase

addAttribute, addAttribute, addAttribute, addAttributeAlways, addAttributes, addXSLAttribute, asContentHandler, asDOMSerializer, characters, close, comment, endEntity, entityReference, error, fatalError, fireEndEntity, getDoctypePublic, getDoctypeSystem, getEncoding, getIndent, getIndentAmount, getMediaType, getNamespaceMappings, getNamespaceURI, getNamespaceURIFromPrefix, getOmitXMLDeclaration, getPrefix, getStandalone, getTransformer, getVersion, namespaceAfterStartElement, notationDecl, reset, setDTDEntityExpansion, setDoctype, setDoctypePublic, setDoctypeSystem, setDocumentLocator, setEncoding, setIndent, setIndentAmount, setMediaType, setNamespaceMappings, setOmitXMLDeclaration, setSourceLocator, setStandalone, setTransformer, setVersion, startDocument, unparsedEntityDecl, warning

Constructor Details

ToUnknownStream

public ToUnknownStream()
Default constructor. Initially this object wraps an XML Stream object, so _handler is never null. That may change later to an HTML Stream object.

Method Details

addAttribute

public void addAttribute(String rawName,
                         String value)
Adds an attribute to the currenly open tag
Specified by:
addAttribute in interface org.apache.xml.serializer.ExtendedContentHandler
Overrides:
addAttribute in interface SerializerBase
Parameters:
rawName - the attribute name, with prefix (if any)
value - the value of the parameter
See Also:
ExtendedContentHandler.addAttribute(String, String)

addAttribute

public void addAttribute(String uri,
                         String localName,
                         String rawName,
                         String type,
                         String value,
                         boolean XSLAttribute)
            throws SAXException
Adds an attribute to the currenly open tag
Specified by:
addAttribute in interface org.apache.xml.serializer.ExtendedContentHandler
Overrides:
addAttribute in interface SerializerBase
Parameters:
uri - the URI of a namespace
localName - the attribute name, without prefix
rawName - the attribute name, with prefix (if any)
type - the type of the attribute, typically "CDATA"
value - the value of the parameter
XSLAttribute - true if this attribute is coming from an xsl:attribute element
See Also:
ExtendedContentHandler.addAttribute(String, String, String, String, String)

addAttributes

public void addAttributes(Attributes atts)
            throws SAXException
Overrides:
addAttributes in interface SerializerBase
See Also:
ExtendedContentHandler.addAttributes(org.xml.sax.Attributes)

addUniqueAttribute

public void addUniqueAttribute(String rawName,
                               String value,
                               int flags)
            throws SAXException
Adds a unique attribute to the currenly open tag
Specified by:
addUniqueAttribute in interface org.apache.xml.serializer.ExtendedContentHandler

asContentHandler

public ContentHandler asContentHandler()
            throws IOException
Specified by:
asContentHandler in interface Serializer
Overrides:
asContentHandler in interface SerializerBase
Returns:
the wrapped XML or HTML handler

asDOMSerializer

public DOMSerializer asDOMSerializer()
            throws IOException
Specified by:
asDOMSerializer in interface Serializer
Overrides:
asDOMSerializer in interface SerializerBase

attributeDecl

public void attributeDecl(String arg0,
                          String arg1,
                          String arg2,
                          String arg3,
                          String arg4)
            throws SAXException
Pass the call on to the underlying handler
See Also:
org.xml.sax.ext.DeclHandler.attributeDecl(String, String, String, String, String)

characters

public void characters(String chars)
            throws SAXException
Converts the String to a character array and calls the SAX method characters(char[],int,int);
Specified by:
characters in interface org.apache.xml.serializer.ExtendedContentHandler
See Also:
ExtendedContentHandler.characters(String)

characters

public void characters(char[] characters,
                       int offset,
                       int length)
            throws SAXException
Pass the call on to the underlying handler
See Also:
org.xml.sax.ContentHandler.characters(char[], int, int)

close

public void close()
Specified by:
close in interface SerializationHandler
Overrides:
close in interface SerializerBase

comment

public void comment(String comment)
            throws SAXException
Pass the call on to the underlying handler
Specified by:
comment in interface org.apache.xml.serializer.ExtendedLexicalHandler
Overrides:
comment in interface SerializerBase
See Also:
ExtendedLexicalHandler.comment(String)

comment

public void comment(char[] ch,
                    int start,
                    int length)
            throws SAXException
Pass the call on to the underlying handler
See Also:
org.xml.sax.ext.LexicalHandler.comment(char[], int, int)

elementDecl

public void elementDecl(String arg0,
                        String arg1)
            throws SAXException
Pass the call on to the underlying handler
See Also:
org.xml.sax.ext.DeclHandler.elementDecl(String, String)

endCDATA

public void endCDATA()
            throws SAXException
Pass the call on to the underlying handler
See Also:
org.xml.sax.ext.LexicalHandler.endCDATA()

endDTD

public void endDTD()
            throws SAXException
Pass the call on to the underlying handler
See Also:
org.xml.sax.ext.LexicalHandler.endDTD()

endDocument

public void endDocument()
            throws SAXException
Pass the call on to the underlying handler
See Also:
org.xml.sax.ContentHandler.endDocument()

endElement

public void endElement(String elementName)
            throws SAXException
Pass the call on to the underlying handler
Specified by:
endElement in interface org.apache.xml.serializer.ExtendedContentHandler
See Also:
ExtendedContentHandler.endElement(String)

endElement

public void endElement(String namespaceURI,
                       String localName,
                       String qName)
            throws SAXException
Pass the call on to the underlying handler
See Also:
org.xml.sax.ContentHandler.endElement(String, String, String)

endEntity

public void endEntity(String name)
            throws SAXException
Pass the call on to the underlying handler
Overrides:
endEntity in interface SerializerBase
See Also:
org.xml.sax.ext.LexicalHandler.endEntity(String)

endPrefixMapping

public void endPrefixMapping(String prefix)
            throws SAXException
Pass the call on to the underlying handler
See Also:
org.xml.sax.ContentHandler.endPrefixMapping(String)

entityReference

public void entityReference(String entityName)
            throws SAXException
Specified by:
entityReference in interface org.apache.xml.serializer.ExtendedContentHandler
Overrides:
entityReference in interface SerializerBase
See Also:
ExtendedContentHandler.entityReference(java.lang.String)

externalEntityDecl

public void externalEntityDecl(String name,
                               String publicId,
                               String systemId)
            throws SAXException
Pass the call on to the underlying handler
See Also:
org.xml.sax.ext.DeclHandler.externalEntityDecl(String, String, String)

flushPending

public void flushPending()
            throws SAXException
Specified by:
flushPending in interface SerializationHandler

getDoctypePublic

public String getDoctypePublic()
Pass the call on to the underlying handler
Specified by:
getDoctypePublic in interface org.apache.xml.serializer.XSLOutputAttributes
Overrides:
getDoctypePublic in interface SerializerBase
See Also:
XSLOutputAttributes.getDoctypePublic()

getDoctypeSystem

public String getDoctypeSystem()
Pass the call on to the underlying handler
Specified by:
getDoctypeSystem in interface org.apache.xml.serializer.XSLOutputAttributes
Overrides:
getDoctypeSystem in interface SerializerBase
See Also:
XSLOutputAttributes.getDoctypeSystem()

getEncoding

public String getEncoding()
Pass the call on to the underlying handler
Specified by:
getEncoding in interface org.apache.xml.serializer.XSLOutputAttributes
Overrides:
getEncoding in interface SerializerBase
See Also:
XSLOutputAttributes.getEncoding()

getIndent

public boolean getIndent()
Pass the call on to the underlying handler
Specified by:
getIndent in interface org.apache.xml.serializer.XSLOutputAttributes
Overrides:
getIndent in interface SerializerBase
See Also:
XSLOutputAttributes.getIndent()

getIndentAmount

public int getIndentAmount()
Pass the call on to the underlying handler
Specified by:
getIndentAmount in interface org.apache.xml.serializer.XSLOutputAttributes
Overrides:
getIndentAmount in interface SerializerBase
See Also:
XSLOutputAttributes.getIndentAmount()

getMediaType

public String getMediaType()
Pass the call on to the underlying handler
Specified by:
getMediaType in interface org.apache.xml.serializer.XSLOutputAttributes
Overrides:
getMediaType in interface SerializerBase
See Also:
XSLOutputAttributes.getMediaType()

getNamespaceMappings

public NamespaceMappings getNamespaceMappings()
Get the current namespace mappings. Simply returns the mappings of the wrapped handler.
Specified by:
getNamespaceMappings in interface org.apache.xml.serializer.ExtendedContentHandler
Overrides:
getNamespaceMappings in interface SerializerBase
See Also:
ExtendedContentHandler.getNamespaceMappings()

getNamespaceURI

public String getNamespaceURI(String qname,
                              boolean isElement)
Specified by:
getNamespaceURI in interface org.apache.xml.serializer.ExtendedContentHandler
Overrides:
getNamespaceURI in interface SerializerBase
See Also:
ExtendedContentHandler.getNamespaceURI(java.lang.String, boolean)

getNamespaceURIFromPrefix

public String getNamespaceURIFromPrefix(String prefix)
Returns the URI of prefix (if any)
Specified by:
getNamespaceURIFromPrefix in interface org.apache.xml.serializer.ExtendedContentHandler
Overrides:
getNamespaceURIFromPrefix in interface SerializerBase
Parameters:
prefix - the prefix whose URI is searched for
Returns:
the namespace URI currently associated with the prefix, null if the prefix is undefined.

getOmitXMLDeclaration

public boolean getOmitXMLDeclaration()
Pass the call on to the underlying handler
Specified by:
getOmitXMLDeclaration in interface org.apache.xml.serializer.XSLOutputAttributes
Overrides:
getOmitXMLDeclaration in interface SerializerBase
See Also:
XSLOutputAttributes.getOmitXMLDeclaration()

getOutputFormat

public Properties getOutputFormat()
Specified by:
getOutputFormat in interface Serializer
Returns:
the properties of the underlying handler

getOutputStream

public OutputStream getOutputStream()
Specified by:
getOutputStream in interface Serializer
Returns:
the OutputStream of the underlying XML or HTML handler

getPrefix

public String getPrefix(String namespaceURI)
Specified by:
getPrefix in interface org.apache.xml.serializer.ExtendedContentHandler
Overrides:
getPrefix in interface SerializerBase
See Also:
ExtendedContentHandler.getPrefix

getStandalone

public String getStandalone()
Pass the call on to the underlying handler
Specified by:
getStandalone in interface org.apache.xml.serializer.XSLOutputAttributes
Overrides:
getStandalone in interface SerializerBase
See Also:
XSLOutputAttributes.getStandalone()

getTransformer

public Transformer getTransformer()
Gets the transformer associated with this serializer
Specified by:
getTransformer in interface SerializationHandler
Overrides:
getTransformer in interface SerializerBase
Returns:
returns the transformer associated with this serializer.

getVersion

public String getVersion()
Pass the call on to the underlying handler
Specified by:
getVersion in interface org.apache.xml.serializer.XSLOutputAttributes
Overrides:
getVersion in interface SerializerBase
See Also:
XSLOutputAttributes.getVersion()

getWriter

public Writer getWriter()
Specified by:
getWriter in interface Serializer
Returns:
the Writer of the underlying XML or HTML handler

ignorableWhitespace

public void ignorableWhitespace(char[] ch,
                                int start,
                                int length)
            throws SAXException
Pass the call on to the underlying handler
See Also:
org.xml.sax.ContentHandler.ignorableWhitespace(char[], int, int)

internalEntityDecl

public void internalEntityDecl(String arg0,
                               String arg1)
            throws SAXException
Pass the call on to the underlying handler
See Also:
org.xml.sax.ext.DeclHandler.internalEntityDecl(String, String)

namespaceAfterStartElement

public void namespaceAfterStartElement(String prefix,
                                       String uri)
            throws SAXException
This method is used when a prefix/uri namespace mapping is indicated after the element was started with a startElement() and before and endElement(). startPrefixMapping(prefix,uri) would be used before the startElement() call.
Specified by:
namespaceAfterStartElement in interface org.apache.xml.serializer.ExtendedContentHandler
Overrides:
namespaceAfterStartElement in interface SerializerBase
Parameters:
prefix - the prefix associated with the given URI.
uri - the URI of the namespace
See Also:
ExtendedContentHandler.namespaceAfterStartElement(String, String)

processingInstruction

public void processingInstruction(String target,
                                  String data)
            throws SAXException
Pass the call on to the underlying handler
See Also:
org.xml.sax.ContentHandler.processingInstruction(String, String)

reset

public boolean reset()
passes the call on to the underlying HTML or XML handler
Specified by:
reset in interface Serializer
Overrides:
reset in interface SerializerBase
Returns:
???

serialize

public void serialize(Node node)
            throws IOException
Converts the DOM node to output
Specified by:
serialize in interface SerializationHandler
serialize in interface DOMSerializer
Parameters:
node - the DOM node to transform to output

setCdataSectionElements

public void setCdataSectionElements(Vector URI_and_localNames)
Specified by:
setCdataSectionElements in interface org.apache.xml.serializer.XSLOutputAttributes
Parameters:
URI_and_localNames - Vector a list of pairs of URI/localName specified in the cdata-section-elements attribute.
See Also:
SerializationHandler.setCdataSectionElements(java.util.Vector)

setContentHandler

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

setDoctype

public void setDoctype(String system,
                       String pub)
Specified by:
setDoctype in interface org.apache.xml.serializer.XSLOutputAttributes
Overrides:
setDoctype in interface SerializerBase
See Also:
XSLOutputAttributes.setDoctype(String, String)

setDoctypePublic

public void setDoctypePublic(String doctype)
Set the doctype in the underlying XML handler. Remember that this method was called, just in case we need to transfer this doctype to an HTML handler
Specified by:
setDoctypePublic in interface org.apache.xml.serializer.XSLOutputAttributes
Overrides:
setDoctypePublic in interface SerializerBase
Parameters:
doctype - the public doctype to set
See Also:
XSLOutputAttributes.setDoctypePublic(String)

setDoctypeSystem

public void setDoctypeSystem(String doctype)
Set the doctype in the underlying XML handler. Remember that this method was called, just in case we need to transfer this doctype to an HTML handler
Specified by:
setDoctypeSystem in interface org.apache.xml.serializer.XSLOutputAttributes
Overrides:
setDoctypeSystem in interface SerializerBase
Parameters:
doctype - the system doctype to set
See Also:
XSLOutputAttributes.setDoctypeSystem(String)

setDocumentLocator

public void setDocumentLocator(Locator locator)
Pass the call on to the underlying handler
Overrides:
setDocumentLocator in interface SerializerBase
See Also:
org.xml.sax.ContentHandler.setDocumentLocator(Locator)

setEncoding

public void setEncoding(String encoding)
Pass the call on to the underlying handler
Specified by:
setEncoding in interface org.apache.xml.serializer.XSLOutputAttributes
Overrides:
setEncoding in interface SerializerBase
See Also:
XSLOutputAttributes.setEncoding(String)

setEscaping

public boolean setEscaping(boolean escape)
            throws SAXException
Specified by:
setEscaping in interface SerializationHandler

setIndent

public void setIndent(boolean indent)
Pass the call on to the underlying handler
Specified by:
setIndent in interface org.apache.xml.serializer.XSLOutputAttributes
Overrides:
setIndent in interface SerializerBase
See Also:
XSLOutputAttributes.setIndent(boolean)

setIndentAmount

public void setIndentAmount(int value)
Pass the call on to the underlying handler
Specified by:
setIndentAmount in interface SerializationHandler
Overrides:
setIndentAmount in interface SerializerBase

setMediaType

public void setMediaType(String mediaType)
Specified by:
setMediaType in interface org.apache.xml.serializer.XSLOutputAttributes
Overrides:
setMediaType in interface SerializerBase
See Also:
XSLOutputAttributes.setMediaType(String)

setOmitXMLDeclaration

public void setOmitXMLDeclaration(boolean b)
Pass the call on to the underlying handler
Specified by:
setOmitXMLDeclaration in interface org.apache.xml.serializer.XSLOutputAttributes
Overrides:
setOmitXMLDeclaration in interface SerializerBase
See Also:
XSLOutputAttributes.setOmitXMLDeclaration(boolean)

setOutputFormat

public void setOutputFormat(Properties format)
Set the properties of the handler
Specified by:
setOutputFormat in interface Serializer
Parameters:
format - the output properties to set

setOutputStream

public void setOutputStream(OutputStream output)
Sets the output stream to write to
Specified by:
setOutputStream in interface Serializer
Parameters:
output - the OutputStream to write to

setSourceLocator

public void setSourceLocator(SourceLocator locator)
This method is used to set the source locator, which might be used to generated an error message.
Specified by:
setSourceLocator in interface org.apache.xml.serializer.ExtendedContentHandler
Overrides:
setSourceLocator in interface SerializerBase
Parameters:
locator - the source locator
See Also:
ExtendedContentHandler.setSourceLocator(javax.xml.transform.SourceLocator)

setStandalone

public void setStandalone(String standalone)
Pass the call on to the underlying handler
Specified by:
setStandalone in interface org.apache.xml.serializer.XSLOutputAttributes
Overrides:
setStandalone in interface SerializerBase
See Also:
XSLOutputAttributes.setStandalone(String)

setTransformer

public void setTransformer(Transformer t)
Sets the transformer associated with this serializer
Specified by:
setTransformer in interface SerializationHandler
Overrides:
setTransformer in interface SerializerBase
Parameters:
t - the transformer associated with this serializer.

setVersion

public void setVersion(String version)
This method cannot be cached because default is different in HTML and XML (we need more than a boolean).
Specified by:
setVersion in interface org.apache.xml.serializer.XSLOutputAttributes
Overrides:
setVersion in interface SerializerBase

setWriter

public void setWriter(Writer writer)
Sets the writer to write to
Specified by:
setWriter in interface Serializer
Parameters:
writer - the writer to write to

skippedEntity

public void skippedEntity(String name)
            throws SAXException
Pass the call on to the underlying handler
See Also:
org.xml.sax.ContentHandler.skippedEntity(String)

startCDATA

public void startCDATA()
            throws SAXException
Pass the call on to the underlying handler
See Also:
org.xml.sax.ext.LexicalHandler.startCDATA()

startDTD

public void startDTD(String name,
                     String publicId,
                     String systemId)
            throws SAXException
Pass the call on to the underlying handler
See Also:
org.xml.sax.ext.LexicalHandler.startDTD(String, String, String)

startDocument

public void startDocument()
            throws SAXException
Overrides:
startDocument in interface SerializerBase
See Also:
org.xml.sax.ContentHandler.startDocument()

startElement

public void startElement(String qName)
            throws SAXException
This method is used to notify of the start of an element
Specified by:
startElement in interface org.apache.xml.serializer.ExtendedContentHandler
Parameters:
qName - the fully qualified name of the element

startElement

public void startElement(String namespaceURI,
                         String localName,
                         String qName)
            throws SAXException
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 org.apache.xml.serializer.ExtendedContentHandler
Parameters:
localName - the local name (without prefix) of the element
qName - the qualified name of the element

startElement

public void startElement(String namespaceURI,
                         String localName,
                         String elementName,
                         Attributes atts)
            throws SAXException

startEntity

public void startEntity(String name)
            throws SAXException
Pass the call on to the underlying handler
See Also:
org.xml.sax.ext.LexicalHandler.startEntity(String)

startPrefixMapping

public void startPrefixMapping(String prefix,
                               String uri)
            throws SAXException
Parameters:
prefix - The prefix that maps to the URI
uri - The URI for the namespace
See Also:
org.xml.sax.ContentHandler.startPrefixMapping(String, String)

startPrefixMapping

public boolean startPrefixMapping(String prefix,
                                  String uri,
                                  boolean shouldFlush)
            throws SAXException
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 org.apache.xml.serializer.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.

Copyright B) 2005 Apache XML Project. All Rights Reserved.