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: ToXMLStream [javadoc | source]
java.lang.Object
   com.sun.org.apache.xml.internal.serializer.SerializerBase
      com.sun.org.apache.xml.internal.serializer.ToStream
         com.sun.org.apache.xml.internal.serializer.ToXMLStream

All Implemented Interfaces:
    SerializationHandler, SerializerConstants

This class converts SAX or SAX-like calls to a serialized xml document. The xsl:output method is "xml". This class is used explicitly in code generated by XSLTC, so it is "public", but it should be viewed as internal or package private, this is not an API.
Field Summary
 boolean m_cdataTagOpen    remembers if we need to write out "]]>" to close the CDATA 
Fields inherited from com.sun.org.apache.xml.internal.serializer.ToStream:
m_disableOutputEscapingStates,  m_encodingInfo,  m_canConvertMeth,  m_triedToGetConverter,  m_charToByteConverter,  m_preserves,  m_ispreserve,  m_isprevtext,  m_maxCharacter,  m_lineSep,  m_lineSepUse,  m_lineSepLen,  m_charInfo,  m_shouldFlush,  m_spaceBeforeClose,  m_startNewLine,  m_inDoctype,  m_isUTF8,  m_format,  m_cdataStartCalled
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 ToXMLStream() 
Method from com.sun.org.apache.xml.internal.serializer.ToXMLStream Summary:
CopyFrom,   addAttribute,   addUniqueAttribute,   endDocument,   endElement,   endPreserving,   entityReference,   namespaceAfterStartElement,   processingInstruction,   pushNamespace,   reset,   startDocumentInternal,   startPreserving
Methods from com.sun.org.apache.xml.internal.serializer.ToStream:
accumDefaultEntity,   accumDefaultEscape,   addAttributeAlways,   attributeDecl,   cdata,   characters,   characters,   charactersRaw,   closeCDATA,   closeStartTag,   comment,   elementDecl,   endCDATA,   endDTD,   endElement,   endElement,   endNonEscaping,   endPrefixMapping,   ensureAttributesNamespaceIsDeclared,   ensurePrefixIsDeclared,   escapingNotNeeded,   externalEntityDecl,   firePseudoAttributes,   flushPending,   flushWriter,   getIndentAmount,   getOutputFormat,   getOutputStream,   getWriter,   ignorableWhitespace,   indent,   indent,   init,   internalEntityDecl,   isUTF16Surrogate,   notationDecl,   outputDocTypeDecl,   outputEntityDecl,   outputLineSep,   processAttributes,   reset,   serialize,   setCdataSectionElements,   setContentHandler,   setDTDEntityExpansion,   setEncoding,   setEscaping,   setIndentAmount,   setLineSepUse,   setOutputFormat,   setOutputStream,   setTransformer,   setWriter,   shouldIndent,   skippedEntity,   startCDATA,   startDTD,   startElement,   startElement,   startElement,   startEntity,   startNonEscaping,   startPrefixMapping,   startPrefixMapping,   unparsedEntityDecl,   writeAttrString,   writeNormalizedChars,   writeUTF16Surrogate
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.ToXMLStream Detail:
 public  void CopyFrom(ToXMLStream xmlListener) 
    Copy properties from another SerializerToXML.
 public  void addAttribute(String uri,
    String localName,
    String rawName,
    String type,
    String value,
    boolean xslAttribute) throws SAXException 
    Add an attribute to the current element.
 public  void addUniqueAttribute(String name,
    String value,
    int flags) throws SAXException 
    This method is used to add an attribute to the currently open element. The caller has guaranted that this attribute is unique, which means that it not been seen before and will not be seen again.
 public  void endDocument() throws SAXException 
    Receive notification of the end of a document.
 public  void endElement(String elemName) throws SAXException 
 public  void endPreserving() throws SAXException 
    Ends a whitespace preserving section.
 public  void entityReference(String name) throws SAXException 
    Receive notivication of a entityReference.
 public  void namespaceAfterStartElement(String prefix,
    String uri) throws SAXException 
    This method is used to notify the serializer of a namespace mapping (or node) that applies to the current element whose startElement() call has already been seen. The official SAX startPrefixMapping(prefix,uri) is to define a mapping for a child element that is soon to be seen with a startElement() call. The official SAX call does not apply to the current element, hence the reason for this method.
 public  void processingInstruction(String target,
    String data) throws SAXException 
    Receive notification of a processing instruction.
 protected boolean pushNamespace(String prefix,
    String uri) 
    From XSLTC Declare a prefix to point to a namespace URI. Inform SAX handler if this is a new prefix mapping.
 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 startDocumentInternal() throws SAXException 
    Receive notification of the beginning of a document.
 public  void startPreserving() throws SAXException 
    Starts a whitespace preserving section. All characters printed within a preserving section are printed without indentation and without consolidating multiple spaces. This is equivalent to the xml:space="preserve" attribute. Only XML and HTML serializers need to support this method.

    The contents of the whitespace preserving section will be delivered through the regular characters event.