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
addAttribute
public void addAttribute(String rawName,
String value)
Adds an attribute to the currenly open tag
- addAttribute in interface org.apache.xml.serializer.ExtendedContentHandler
- addAttribute in interface SerializerBase
rawName
- the attribute name, with prefix (if any)value
- the value of the parameter
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
- addAttribute in interface org.apache.xml.serializer.ExtendedContentHandler
- addAttribute in interface SerializerBase
uri
- the URI of a namespacelocalName
- the attribute name, without prefixrawName
- the attribute name, with prefix (if any)type
- the type of the attribute, typically "CDATA"value
- the value of the parameterXSLAttribute
- true if this attribute is coming from an xsl:attribute element
ExtendedContentHandler.addAttribute(String, String, String, String, String)
addAttributes
public void addAttributes(Attributes atts)
throws SAXException
- addAttributes in interface SerializerBase
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
- addUniqueAttribute in interface org.apache.xml.serializer.ExtendedContentHandler
attributeDecl
public void attributeDecl(String arg0,
String arg1,
String arg2,
String arg3,
String arg4)
throws SAXException
Pass the call on to the underlying handler
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);
- characters in interface org.apache.xml.serializer.ExtendedContentHandler
ExtendedContentHandler.characters(String)
characters
public void characters(char[] characters,
int offset,
int length)
throws SAXException
Pass the call on to the underlying handler
org.xml.sax.ContentHandler.characters(char[], int, int)
comment
public void comment(String comment)
throws SAXException
Pass the call on to the underlying handler
- comment in interface org.apache.xml.serializer.ExtendedLexicalHandler
- comment in interface SerializerBase
ExtendedLexicalHandler.comment(String)
comment
public void comment(char[] ch,
int start,
int length)
throws SAXException
Pass the call on to the underlying handler
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
org.xml.sax.ext.DeclHandler.elementDecl(String, String)
endCDATA
public void endCDATA()
throws SAXException
Pass the call on to the underlying handler
org.xml.sax.ext.LexicalHandler.endCDATA()
endDTD
public void endDTD()
throws SAXException
Pass the call on to the underlying handler
org.xml.sax.ext.LexicalHandler.endDTD()
endDocument
public void endDocument()
throws SAXException
Pass the call on to the underlying handler
org.xml.sax.ContentHandler.endDocument()
endElement
public void endElement(String elementName)
throws SAXException
Pass the call on to the underlying handler
- endElement in interface org.apache.xml.serializer.ExtendedContentHandler
ExtendedContentHandler.endElement(String)
endElement
public void endElement(String namespaceURI,
String localName,
String qName)
throws SAXException
Pass the call on to the underlying handler
org.xml.sax.ContentHandler.endElement(String, String, String)
endEntity
public void endEntity(String name)
throws SAXException
Pass the call on to the underlying handler
- endEntity in interface SerializerBase
org.xml.sax.ext.LexicalHandler.endEntity(String)
endPrefixMapping
public void endPrefixMapping(String prefix)
throws SAXException
Pass the call on to the underlying handler
org.xml.sax.ContentHandler.endPrefixMapping(String)
entityReference
public void entityReference(String entityName)
throws SAXException
- entityReference in interface org.apache.xml.serializer.ExtendedContentHandler
- entityReference in interface SerializerBase
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
org.xml.sax.ext.DeclHandler.externalEntityDecl(String, String, String)
getDoctypePublic
public String getDoctypePublic()
Pass the call on to the underlying handler
- getDoctypePublic in interface org.apache.xml.serializer.XSLOutputAttributes
- getDoctypePublic in interface SerializerBase
XSLOutputAttributes.getDoctypePublic()
getDoctypeSystem
public String getDoctypeSystem()
Pass the call on to the underlying handler
- getDoctypeSystem in interface org.apache.xml.serializer.XSLOutputAttributes
- getDoctypeSystem in interface SerializerBase
XSLOutputAttributes.getDoctypeSystem()
getEncoding
public String getEncoding()
Pass the call on to the underlying handler
- getEncoding in interface org.apache.xml.serializer.XSLOutputAttributes
- getEncoding in interface SerializerBase
XSLOutputAttributes.getEncoding()
getIndent
public boolean getIndent()
Pass the call on to the underlying handler
- getIndent in interface org.apache.xml.serializer.XSLOutputAttributes
- getIndent in interface SerializerBase
XSLOutputAttributes.getIndent()
getIndentAmount
public int getIndentAmount()
Pass the call on to the underlying handler
- getIndentAmount in interface org.apache.xml.serializer.XSLOutputAttributes
- getIndentAmount in interface SerializerBase
XSLOutputAttributes.getIndentAmount()
getMediaType
public String getMediaType()
Pass the call on to the underlying handler
- getMediaType in interface org.apache.xml.serializer.XSLOutputAttributes
- getMediaType in interface SerializerBase
XSLOutputAttributes.getMediaType()
getNamespaceURI
public String getNamespaceURI(String qname,
boolean isElement)
- getNamespaceURI in interface org.apache.xml.serializer.ExtendedContentHandler
- getNamespaceURI in interface SerializerBase
ExtendedContentHandler.getNamespaceURI(java.lang.String, boolean)
getNamespaceURIFromPrefix
public String getNamespaceURIFromPrefix(String prefix)
Returns the URI of prefix (if any)
- getNamespaceURIFromPrefix in interface org.apache.xml.serializer.ExtendedContentHandler
- getNamespaceURIFromPrefix in interface SerializerBase
prefix
- the prefix whose URI is searched for
- the namespace URI currently associated with the
prefix, null if the prefix is undefined.
getOutputFormat
public Properties getOutputFormat()
- getOutputFormat in interface Serializer
- the properties of the underlying handler
getOutputStream
public OutputStream getOutputStream()
- getOutputStream in interface Serializer
- the OutputStream of the underlying XML or HTML handler
getPrefix
public String getPrefix(String namespaceURI)
- getPrefix in interface org.apache.xml.serializer.ExtendedContentHandler
- getPrefix in interface SerializerBase
ExtendedContentHandler.getPrefix
getStandalone
public String getStandalone()
Pass the call on to the underlying handler
- getStandalone in interface org.apache.xml.serializer.XSLOutputAttributes
- getStandalone in interface SerializerBase
XSLOutputAttributes.getStandalone()
getVersion
public String getVersion()
Pass the call on to the underlying handler
- getVersion in interface org.apache.xml.serializer.XSLOutputAttributes
- getVersion in interface SerializerBase
XSLOutputAttributes.getVersion()
getWriter
public Writer getWriter()
- getWriter in interface Serializer
- 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
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
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.
- namespaceAfterStartElement in interface org.apache.xml.serializer.ExtendedContentHandler
- namespaceAfterStartElement in interface SerializerBase
prefix
- the prefix associated with the given URI.uri
- the URI of the namespace
ExtendedContentHandler.namespaceAfterStartElement(String, String)
processingInstruction
public void processingInstruction(String target,
String data)
throws SAXException
Pass the call on to the underlying handler
org.xml.sax.ContentHandler.processingInstruction(String, String)
setCdataSectionElements
public void setCdataSectionElements(Vector URI_and_localNames)
- setCdataSectionElements in interface org.apache.xml.serializer.XSLOutputAttributes
URI_and_localNames
- Vector a list of pairs of URI/localName
specified in the cdata-section-elements attribute.
SerializationHandler.setCdataSectionElements(java.util.Vector)
setDoctype
public void setDoctype(String system,
String pub)
- setDoctype in interface org.apache.xml.serializer.XSLOutputAttributes
- setDoctype in interface SerializerBase
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
- setDoctypePublic in interface org.apache.xml.serializer.XSLOutputAttributes
- setDoctypePublic in interface SerializerBase
doctype
- the public doctype to set
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
- setDoctypeSystem in interface org.apache.xml.serializer.XSLOutputAttributes
- setDoctypeSystem in interface SerializerBase
doctype
- the system doctype to set
XSLOutputAttributes.setDoctypeSystem(String)
setDocumentLocator
public void setDocumentLocator(Locator locator)
Pass the call on to the underlying handler
- setDocumentLocator in interface SerializerBase
org.xml.sax.ContentHandler.setDocumentLocator(Locator)
setEncoding
public void setEncoding(String encoding)
Pass the call on to the underlying handler
- setEncoding in interface org.apache.xml.serializer.XSLOutputAttributes
- setEncoding in interface SerializerBase
XSLOutputAttributes.setEncoding(String)
setIndent
public void setIndent(boolean indent)
Pass the call on to the underlying handler
- setIndent in interface org.apache.xml.serializer.XSLOutputAttributes
- setIndent in interface SerializerBase
XSLOutputAttributes.setIndent(boolean)
setMediaType
public void setMediaType(String mediaType)
- setMediaType in interface org.apache.xml.serializer.XSLOutputAttributes
- setMediaType in interface SerializerBase
XSLOutputAttributes.setMediaType(String)
setOmitXMLDeclaration
public void setOmitXMLDeclaration(boolean b)
Pass the call on to the underlying handler
- setOmitXMLDeclaration in interface org.apache.xml.serializer.XSLOutputAttributes
- setOmitXMLDeclaration in interface SerializerBase
XSLOutputAttributes.setOmitXMLDeclaration(boolean)
setOutputFormat
public void setOutputFormat(Properties format)
Set the properties of the handler
- setOutputFormat in interface Serializer
format
- the output properties to set
setOutputStream
public void setOutputStream(OutputStream output)
Sets the output stream to write to
- setOutputStream in interface Serializer
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.
- setSourceLocator in interface org.apache.xml.serializer.ExtendedContentHandler
- setSourceLocator in interface SerializerBase
locator
- the source locator
ExtendedContentHandler.setSourceLocator(javax.xml.transform.SourceLocator)
setStandalone
public void setStandalone(String standalone)
Pass the call on to the underlying handler
- setStandalone in interface org.apache.xml.serializer.XSLOutputAttributes
- setStandalone in interface SerializerBase
XSLOutputAttributes.setStandalone(String)
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).
- setVersion in interface org.apache.xml.serializer.XSLOutputAttributes
- setVersion in interface SerializerBase
setWriter
public void setWriter(Writer writer)
Sets the writer to write to
- setWriter in interface Serializer
writer
- the writer to write to
skippedEntity
public void skippedEntity(String name)
throws SAXException
Pass the call on to the underlying handler
org.xml.sax.ContentHandler.skippedEntity(String)
startCDATA
public void startCDATA()
throws SAXException
Pass the call on to the underlying handler
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
org.xml.sax.ext.LexicalHandler.startDTD(String, String, String)
startDocument
public void startDocument()
throws SAXException
- startDocument in interface SerializerBase
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
- startElement in interface org.apache.xml.serializer.ExtendedContentHandler
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.
- startElement in interface org.apache.xml.serializer.ExtendedContentHandler
localName
- the local name (without prefix) of the elementqName
- 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
org.xml.sax.ext.LexicalHandler.startEntity(String)
startPrefixMapping
public void startPrefixMapping(String prefix,
String uri)
throws SAXException
prefix
- The prefix that maps to the URIuri
- The URI for the namespace
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.
- startPrefixMapping in interface org.apache.xml.serializer.ExtendedContentHandler
prefix
- the prefix that maps to the given URIuri
- the namespace URI of the given prefixshouldFlush
- 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.
- 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.