This class receives notification of SAX-like events, and with gathered
information over these calls it will invoke the equivalent SAX methods
on a handler, the ultimate xsl:output method is known to be "xml".
This class is not a public API, it is only public because it is used by Xalan.
addAttribute
public void addAttribute(String uri,
String localName,
String rawName,
String type,
String value,
boolean XSLAttribute)
throws SAXException
Adds the given attribute to the set of attributes, and also makes sure
that the needed prefix/uri mapping is declared, but only if there is a
currently open element.
- addAttribute in interface org.apache.xml.serializer.ExtendedContentHandler
- addAttribute in interface SerializerBase
uri
- the URI of the attributelocalName
- the local name of the attributerawName
- the qualified name of the attributetype
- the type of the attribute (probably CDATA)value
- the value of the attributeXSLAttribute
- true if this attribute is coming from an xsl:attribute element
ExtendedContentHandler.addAttribute(String, String, String, String, String)
attributeDecl
public void attributeDecl(String arg0,
String arg1,
String arg2,
String arg3,
String arg4)
throws SAXException
org.xml.sax.ext.DeclHandler.attributeDecl(String, String, String, String, String)
characters
public void characters(String chars)
throws SAXException
- characters in interface org.apache.xml.serializer.ExtendedContentHandler
- characters in interface ToSAXHandler
ExtendedContentHandler.characters(String)
characters
public void characters(char[] ch,
int off,
int len)
throws SAXException
closeCDATA
public void closeCDATA()
throws SAXException
Closes ane open cdata tag, and
unlike the this.endCDATA() method (from the LexicalHandler) interface,
this "internal" method will send the endCDATA() call to the wrapped
handler.
comment
public void comment(char[] arg0,
int arg1,
int arg2)
throws SAXException
org.xml.sax.ext.LexicalHandler.comment(char[], int, int)
elementDecl
public void elementDecl(String arg0,
String arg1)
throws SAXException
org.xml.sax.ext.DeclHandler.elementDecl(String, String)
endCDATA
public void endCDATA()
throws SAXException
org.xml.sax.ext.LexicalHandler.endCDATA()
endDTD
public void endDTD()
throws SAXException
org.xml.sax.ext.LexicalHandler.endDTD()
endDocument
public void endDocument()
throws SAXException
Receives notification of the end of the document.
org.xml.sax.ContentHandler.endDocument()
endElement
public void endElement(String elemName)
throws SAXException
- endElement in interface org.apache.xml.serializer.ExtendedContentHandler
ExtendedContentHandler.endElement(String)
endElement
public void endElement(String namespaceURI,
String localName,
String qName)
throws SAXException
org.xml.sax.ContentHandler.endElement(String, String, String)
endPrefixMapping
public void endPrefixMapping(String prefix)
throws SAXException
org.xml.sax.ContentHandler.endPrefixMapping(String)
externalEntityDecl
public void externalEntityDecl(String arg0,
String arg1,
String arg2)
throws SAXException
org.xml.sax.ext.DeclHandler.externalEntityDecl(String, String, String)
ignorableWhitespace
public void ignorableWhitespace(char[] arg0,
int arg1,
int arg2)
throws SAXException
org.xml.sax.ContentHandler.ignorableWhitespace(char[], int, int)
indent
public void indent(int n)
throws SAXException
Do nothing for SAX.
internalEntityDecl
public void internalEntityDecl(String arg0,
String arg1)
throws SAXException
org.xml.sax.ext.DeclHandler.internalEntityDecl(String, String)
namespaceAfterStartElement
public void namespaceAfterStartElement(String prefix,
String uri)
throws SAXException
Send a namespace declaration in the output document. The namespace
declaration will not be include if the namespace is already in scope
with the same prefix.
- namespaceAfterStartElement in interface org.apache.xml.serializer.ExtendedContentHandler
- namespaceAfterStartElement in interface SerializerBase
processingInstruction
public void processingInstruction(String target,
String data)
throws SAXException
- processingInstruction in interface ToSAXHandler
Send a processing instruction to the output document
reset
public boolean reset()
Try's to reset the super class and reset this class for
re-use, so that you don't need to create a new serializer
(mostly for performance reasons).
- reset in interface Serializer
- reset in interface ToSAXHandler
- true if the class was successfuly reset.
setDocumentLocator
public void setDocumentLocator(Locator arg0)
- setDocumentLocator in interface SerializerBase
org.xml.sax.ContentHandler.setDocumentLocator(Locator)
skippedEntity
public void skippedEntity(String arg0)
throws SAXException
org.xml.sax.ContentHandler.skippedEntity(String)
startCDATA
public void startCDATA()
throws SAXException
startElement
public void startElement(String elementName)
throws SAXException
An element starts, but attributes are not fully known yet.
- startElement in interface org.apache.xml.serializer.ExtendedContentHandler
- startElement in interface ToSAXHandler
ExtendedContentHandler.startElement(String)
startElement
public void startElement(String elementNamespaceURI,
String elementLocalName,
String elementName)
throws SAXException
Start an element in the output document. This might be an XML element
(data type) or a CDATA section.
- startElement in interface org.apache.xml.serializer.ExtendedContentHandler
- startElement in interface ToSAXHandler
startElement
public void startElement(String namespaceURI,
String localName,
String name,
Attributes atts)
throws SAXException
- startElement in interface ToSAXHandler
org.xml.sax.ContentHandler.startElement(String, String, String, Attributes)
startEntity
public void startEntity(String arg0)
throws SAXException
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 org.xml.sax.SAXException
Remember the prefix/uri mapping at the current nested element depth.
- startPrefixMapping in interface org.apache.xml.serializer.ExtendedContentHandler
prefix
- The prefix that maps to the URIuri
- The URI for the namespaceshouldFlush
- a flag indicating if the mapping applies to the
current element or an up coming child (not used).
org.xml.sax.ContentHandler.startPrefixMapping(String, String)