|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.xml.serializer.SerializerBase | +--org.apache.xml.serializer.ToSAXHandler | +--org.apache.xml.serializer.ToXMLSAXHandler
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.
Constructor Summary | |
ToXMLSAXHandler()
|
|
ToXMLSAXHandler(ContentHandler handler,
LexicalHandler lex,
java.lang.String encoding)
|
|
ToXMLSAXHandler(ContentHandler handler,
java.lang.String encoding)
|
Method Summary | |
void |
addAttribute(java.lang.String uri,
java.lang.String localName,
java.lang.String rawName,
java.lang.String type,
java.lang.String value,
boolean XSLAttribute)
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. |
void |
attributeDecl(java.lang.String arg0,
java.lang.String arg1,
java.lang.String arg2,
java.lang.String arg3,
java.lang.String arg4)
|
void |
characters(char[] ch,
int off,
int len)
|
void |
characters(java.lang.String chars)
|
void |
closeCDATA()
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. |
void |
comment(char[] arg0,
int arg1,
int arg2)
|
void |
elementDecl(java.lang.String arg0,
java.lang.String arg1)
|
void |
endCDATA()
|
void |
endDocument()
Receives notification of the end of the document. |
void |
endDTD()
|
void |
endElement(java.lang.String elemName)
|
void |
endElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String qName)
|
void |
endPrefixMapping(java.lang.String prefix)
|
void |
externalEntityDecl(java.lang.String arg0,
java.lang.String arg1,
java.lang.String arg2)
|
java.util.Properties |
getOutputFormat()
|
java.io.OutputStream |
getOutputStream()
|
java.io.Writer |
getWriter()
|
void |
ignorableWhitespace(char[] arg0,
int arg1,
int arg2)
|
void |
indent(int n)
Do nothing for SAX. |
void |
internalEntityDecl(java.lang.String arg0,
java.lang.String arg1)
|
void |
namespaceAfterStartElement(java.lang.String prefix,
java.lang.String uri)
Send a namespace declaration in the output document. |
void |
processingInstruction(java.lang.String target,
java.lang.String data)
|
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). |
void |
serialize(Node node)
|
void |
setDocumentLocator(Locator arg0)
|
boolean |
setEscaping(boolean escape)
|
void |
setOutputFormat(java.util.Properties format)
|
void |
setOutputStream(java.io.OutputStream output)
|
void |
setWriter(java.io.Writer writer)
|
void |
skippedEntity(java.lang.String arg0)
|
void |
startCDATA()
|
void |
startElement(java.lang.String elementName)
|
void |
startElement(java.lang.String elementNamespaceURI,
java.lang.String elementLocalName,
java.lang.String elementName)
Start an element in the output document. |
void |
startElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String name,
Attributes atts)
|
void |
startEntity(java.lang.String arg0)
|
void |
startPrefixMapping(java.lang.String prefix,
java.lang.String uri)
|
boolean |
startPrefixMapping(java.lang.String prefix,
java.lang.String uri,
boolean shouldFlush)
Remember the prefix/uri mapping at the current nested element depth. |
Methods inherited from class org.apache.xml.serializer.ToSAXHandler |
addUniqueAttribute,
characters,
comment,
error,
fatalError,
flushPending,
setCdataSectionElements,
setContentHandler,
setLexHandler,
setShouldOutputNSAttr,
setTransformState,
startDTD,
warning |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public ToXMLSAXHandler()
public ToXMLSAXHandler(ContentHandler handler, java.lang.String encoding)
public ToXMLSAXHandler(ContentHandler handler, LexicalHandler lex, java.lang.String encoding)
Method Detail |
public java.util.Properties getOutputFormat()
Serializer.getOutputFormat()
public java.io.OutputStream getOutputStream()
Serializer.getOutputStream()
public java.io.Writer getWriter()
Serializer.getWriter()
public void indent(int n) throws SAXException
public void serialize(Node node) throws java.io.IOException
DOMSerializer.serialize(Node)
public boolean setEscaping(boolean escape) throws SAXException
SerializationHandler.setEscaping(boolean)
public void setOutputFormat(java.util.Properties format)
Serializer.setOutputFormat(Properties)
public void setOutputStream(java.io.OutputStream output)
Serializer.setOutputStream(OutputStream)
public void setWriter(java.io.Writer writer)
Serializer.setWriter(Writer)
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
DeclHandler.attributeDecl(String, String, String, String, String)
public void elementDecl(java.lang.String arg0, java.lang.String arg1) throws SAXException
DeclHandler.elementDecl(String, String)
public void externalEntityDecl(java.lang.String arg0, java.lang.String arg1, java.lang.String arg2) throws SAXException
DeclHandler.externalEntityDecl(String, String, String)
public void internalEntityDecl(java.lang.String arg0, java.lang.String arg1) throws SAXException
DeclHandler.internalEntityDecl(String, String)
public void endDocument() throws SAXException
ContentHandler.endDocument()
public void closeCDATA() throws SAXException
public void endElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName) throws SAXException
ContentHandler.endElement(String, String, String)
public void endPrefixMapping(java.lang.String prefix) throws SAXException
ContentHandler.endPrefixMapping(String)
public void ignorableWhitespace(char[] arg0, int arg1, int arg2) throws SAXException
ContentHandler.ignorableWhitespace(char[], int, int)
public void setDocumentLocator(Locator arg0)
ContentHandler.setDocumentLocator(Locator)
public void skippedEntity(java.lang.String arg0) throws SAXException
ContentHandler.skippedEntity(String)
public void startPrefixMapping(java.lang.String prefix, java.lang.String uri) throws SAXException
prefix
- The prefix that maps to the URIuri
- The URI for the namespaceContentHandler.startPrefixMapping(String, String)
public boolean startPrefixMapping(java.lang.String prefix, java.lang.String uri, boolean shouldFlush) throws SAXException
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).ContentHandler.startPrefixMapping(String, String)
public void comment(char[] arg0, int arg1, int arg2) throws SAXException
LexicalHandler.comment(char[], int, int)
public void endCDATA() throws SAXException
LexicalHandler.endCDATA()
public void endDTD() throws SAXException
LexicalHandler.endDTD()
public void startEntity(java.lang.String arg0) throws SAXException
LexicalHandler.startEntity(String)
public void characters(java.lang.String chars) throws SAXException
ExtendedContentHandler.characters(String)
public void startElement(java.lang.String elementNamespaceURI, java.lang.String elementLocalName, java.lang.String elementName) throws SAXException
public void startElement(java.lang.String elementName) throws SAXException
public void characters(char[] ch, int off, int len) throws SAXException
public void endElement(java.lang.String elemName) throws SAXException
ExtendedContentHandler.endElement(String)
public void namespaceAfterStartElement(java.lang.String prefix, java.lang.String uri) throws SAXException
public void processingInstruction(java.lang.String target, java.lang.String data) throws SAXException
public void startCDATA() throws SAXException
public void startElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String name, Attributes atts) throws SAXException
ContentHandler.startElement(String, String, String, Attributes)
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
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 elementExtendedContentHandler.addAttribute(String, String, String, String, String)
public boolean reset()
Serializer.reset()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |