Save This Page
Home » openjdk-7 » com.sun.org.apache.xml.internal » serializer » [javadoc | source]
com.sun.org.apache.xml.internal.serializer
public final class: ToXMLSAXHandler [javadoc | source]
java.lang.Object
   com.sun.org.apache.xml.internal.serializer.SerializerBase
      com.sun.org.apache.xml.internal.serializer.ToSAXHandler
         com.sun.org.apache.xml.internal.serializer.ToXMLSAXHandler

All Implemented Interfaces:
    SerializationHandler, SerializerConstants

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.
Field Summary
protected  boolean m_escapeSetting    Keeps track of whether output escaping is currently enabled 
Fields inherited from com.sun.org.apache.xml.internal.serializer.ToSAXHandler:
m_saxHandler,  m_lexHandler,  m_state
Fields inherited from com.sun.org.apache.xml.internal.serializer.SerializerBase:
m_needToCallStartDocument,  m_cdataTagOpen,  m_attributes,  m_inEntityRef,  m_inExternalDTD,  m_needToOutputDocTypeDecl,  m_standaloneWasSpecified,  m_doIndent,  m_indentAmount,  m_cdataSectionElements,  m_prefixMap,  m_tracer,  m_sourceLocator,  m_writer,  m_elemContext,  m_charsBuff,  m_attrBuff,  m_needToCallSetDocumentInfo
Constructor:
 public ToXMLSAXHandler() 
 public ToXMLSAXHandler(ContentHandler handler,
    String encoding) 
 public ToXMLSAXHandler(ContentHandler handler,
    LexicalHandler lex,
    String encoding) 
Method from com.sun.org.apache.xml.internal.serializer.ToXMLSAXHandler Summary:
addAttribute,   attributeDecl,   characters,   characters,   closeCDATA,   closeStartTag,   comment,   elementDecl,   endCDATA,   endDTD,   endDocument,   endElement,   endElement,   endPrefixMapping,   externalEntityDecl,   getOutputFormat,   getOutputStream,   getWriter,   ignorableWhitespace,   indent,   internalEntityDecl,   namespaceAfterStartElement,   popNamespace,   processingInstruction,   reset,   serialize,   setDocumentLocator,   setEscaping,   setOutputFormat,   setOutputStream,   setWriter,   skippedEntity,   startCDATA,   startElement,   startElement,   startElement,   startEntity,   startPrefixMapping,   startPrefixMapping
Methods from com.sun.org.apache.xml.internal.serializer.ToSAXHandler:
addUniqueAttribute,   characters,   characters,   closeCDATA,   closeStartTag,   comment,   error,   fatalError,   flushPending,   getShouldOutputNSAttr,   processingInstruction,   reset,   setCdataSectionElements,   setContentHandler,   setLexHandler,   setShouldOutputNSAttr,   setTransformState,   startDTD,   startDocumentInternal,   startElement,   startElement,   startElement,   warning
Methods from com.sun.org.apache.xml.internal.serializer.SerializerBase:
addAttribute,   addAttribute,   addAttribute,   addAttributeAlways,   addAttributes,   addXSLAttribute,   asContentHandler,   asDOMSerializer,   characters,   close,   comment,   endEntity,   entityReference,   error,   fatalError,   fireCDATAEvent,   fireCharEvent,   fireCommentEvent,   fireEndDoc,   fireEndElem,   fireEndEntity,   fireEntityReference,   fireEscapingEvent,   fireStartDoc,   fireStartElem,   fireStartEntity,   getDoctypePublic,   getDoctypeSystem,   getEncoding,   getIndent,   getIndentAmount,   getLocalName,   getMediaType,   getNamespaceMappings,   getNamespaceURI,   getNamespaceURIFromPrefix,   getOmitXMLDeclaration,   getPrefix,   getPrefixPart,   getStandalone,   getTransformer,   getVersion,   inTemporaryOutputState,   initCDATA,   isCdataSection,   namespaceAfterStartElement,   notationDecl,   patchName,   reset,   setDTDEntityExpansion,   setDoctype,   setDoctypePublic,   setDoctypeSystem,   setDocumentInfo,   setDocumentLocator,   setEncoding,   setIndent,   setIndentAmount,   setMediaType,   setNamespaceMappings,   setOmitXMLDeclaration,   setSourceLocator,   setStandalone,   setStandaloneInternal,   setTransformer,   setVersion,   startDocument,   startDocumentInternal,   unparsedEntityDecl,   warning
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from com.sun.org.apache.xml.internal.serializer.ToXMLSAXHandler Detail:
 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.
 public  void attributeDecl(String arg0,
    String arg1,
    String arg2,
    String arg3,
    String arg4) throws SAXException 
 public  void characters(String chars) throws SAXException 
 public  void characters(char[] ch,
    int off,
    int len) throws SAXException 
 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.
 protected  void closeStartTag() throws SAXException 
    This method is called when all the data needed for a call to the SAX handler's startElement() method has been gathered.
 public  void comment(char[] arg0,
    int arg1,
    int arg2) throws SAXException 
 public  void elementDecl(String arg0,
    String arg1) throws SAXException 
 public  void endCDATA() throws SAXException 
 public  void endDTD() throws SAXException 
 public  void endDocument() throws SAXException 
    Receives notification of the end of the document.
 public  void endElement(String elemName) throws SAXException 
 public  void endElement(String namespaceURI,
    String localName,
    String qName) throws SAXException 
 public  void endPrefixMapping(String prefix) throws SAXException 
 public  void externalEntityDecl(String arg0,
    String arg1,
    String arg2) throws SAXException 
 public Properties getOutputFormat() 
 public OutputStream getOutputStream() 
 public Writer getWriter() 
 public  void ignorableWhitespace(char[] arg0,
    int arg1,
    int arg2) throws SAXException 
 public  void indent(int n) throws SAXException 
    Do nothing for SAX.
 public  void internalEntityDecl(String arg0,
    String arg1) throws SAXException 
 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.
 protected boolean popNamespace(String prefix) 
    Undeclare the namespace that is currently pointed to by a given prefix. Inform SAX handler if prefix was previously mapped.
 public  void processingInstruction(String target,
    String data) throws SAXException 
 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).
 public  void serialize(Node node) throws IOException 
 public  void setDocumentLocator(Locator arg0) 
 public boolean setEscaping(boolean escape) throws SAXException 
 public  void setOutputFormat(Properties format) 
 public  void setOutputStream(OutputStream output) 
 public  void setWriter(Writer writer) 
 public  void skippedEntity(String arg0) throws SAXException 
 public  void startCDATA() throws SAXException 
 public  void startElement(String elementName) throws SAXException 
 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.
 public  void startElement(String namespaceURI,
    String localName,
    String name,
    Attributes atts) throws SAXException 
 public  void startEntity(String arg0) throws SAXException 
 public  void startPrefixMapping(String prefix,
    String uri) throws SAXException 
 public boolean startPrefixMapping(String prefix,
    String uri,
    boolean shouldFlush) throws SAXException 
    Remember the prefix/uri mapping at the current nested element depth.