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

All Implemented Interfaces:
    SerializationHandler, SerializerConstants

Direct Known Subclasses:
    ToXMLSAXHandler, ToTextSAXHandler, ToHTMLSAXHandler

This class is used to provide a base behavior to be inherited by other To...SAXHandler serializers. This class is not a public API.
Field Summary
protected  ContentHandler m_saxHandler    Underlying SAX handler. Taken from XSLTC 
protected  LexicalHandler m_lexHandler    Underlying LexicalHandler. Taken from XSLTC 
protected  TransformStateSetter m_state    If this is true, then the content handler wrapped by this serializer implements the TransformState interface which will give the content handler access to the state of the transform. 
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 ToSAXHandler() 
 public ToSAXHandler(ContentHandler handler,
    String encoding) 
 public ToSAXHandler(ContentHandler hdlr,
    LexicalHandler lex,
    String encoding) 
Method from com.sun.org.apache.xml.internal.serializer.ToSAXHandler Summary:
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.ToSAXHandler Detail:
 public  void addUniqueAttribute(String qName,
    String value,
    int flags) throws SAXException 
    Add a unique attribute
 public  void characters(String characters) throws SAXException 
    Receive notification of character data.
 public  void characters(Node node) throws SAXException 
    This method gets the node's value as a String and uses that String as if it were an input character notification.
 protected  void closeCDATA() throws SAXException 
 protected  void closeStartTag() throws SAXException 
 public  void comment(String comment) throws SAXException 
    Receive notification of a comment.
 public  void error(SAXParseException exc) throws SAXException 
 public  void fatalError(SAXParseException exc) throws SAXException 
 public  void flushPending() throws SAXException 
    This method flushes any pending events, which can be startDocument() closing the opening tag of an element, or closing an open CDATA section.
 boolean getShouldOutputNSAttr() 
    Returns true if namespace declarations from calls such as startPrefixMapping("prefix1","uri1") should also be mirrored with self generated additional attributes of elements that declare the namespace, for example the attribute xmlns:prefix1="uri1"
 public  void processingInstruction(String target,
    String data) throws SAXException 
    Do nothing as this is an abstract class. All subclasses will need to define their behavior if it is different.
 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 setCdataSectionElements(Vector URI_and_localNames) 
    Does nothing. The setting of CDATA section elements has an impact on stream serializers.
 public  void setContentHandler(ContentHandler _saxHandler) 
    Sets the SAX ContentHandler.
 public  void setLexHandler(LexicalHandler _lexHandler) 
    Sets the LexicalHandler.
 public  void setShouldOutputNSAttr(boolean doOutputNSAttr) 
    Set whether or not namespace declarations (e.g. xmlns:foo) should appear as attributes of elements
 public  void setTransformState(TransformStateSetter ts) 
    Pass in a reference to a TransformState object, which can be used during SAX ContentHandler events to obtain information about he state of the transformation. This method will be called before each startDocument event.
 public  void startDTD(String arg0,
    String arg1,
    String arg2) throws SAXException 
    Do nothing.
 protected  void startDocumentInternal() throws SAXException 
    Pass callback to the SAX Handler
 public  void startElement(String qName) throws SAXException 
    An element starts, but attributes are not fully known yet.
 public  void startElement(String uri,
    String localName,
    String qName) throws SAXException 
    Receives notification that an element starts, but attributes are not fully known yet.
 public  void startElement(String arg0,
    String arg1,
    String arg2,
    Attributes arg3) throws SAXException 
    Receive notification of the beginning of an element, although this is a SAX method additional namespace or attribute information can occur before or after this call, that is associated with this element.
 public  void warning(SAXParseException exc) throws SAXException