Logo Search packages:      
Sourcecode: xalan version File versions  Download package

FormatterToXML Class Reference

#include <FormatterToXML.hpp>

Inheritance diagram for FormatterToXML:

FormatterListener FormatterToHTML

List of all members.


Detailed Description

FormatterToXML formats SAX-style events into XML.

Definition at line 57 of file FormatterToXML.hpp.


Public Types

typedef XalanVector< bool > BoolStackType
typedef XalanVector< char > ByteBufferType
typedef XalanVector< XalanDOMChar > DOMCharBufferType
enum  eDummy { eDefaultIndentAmount = 0 }
enum  eFormat {
  OUTPUT_METHOD_NONE = 0, OUTPUT_METHOD_XML = 1, OUTPUT_METHOD_HTML = 2, OUTPUT_METHOD_TEXT = 3,
  OUTPUT_METHOD_DOM = 4, OUTPUT_METHOD_OTHER = 5
}
enum  eXMLVersion { XML_VERSION_1_0 = 0, XML_VERSION_1_1 = 1 }
typedef
XERCES_CPP_NAMESPACE_QUALIFIER
DocumentHandler 
ParentType

Public Member Functions

virtual void cdata (const XMLCh *const ch, const unsigned int length)
virtual void characters (const XMLCh *const chars, const unsigned int length)
virtual void charactersRaw (const XMLCh *const chars, const unsigned int length)
virtual void comment (const XMLCh *const data)
virtual void endDocument ()
virtual void endElement (const XMLCh *const name)
virtual void entityReference (const XMLCh *const name)
 FormatterToXML (Writer &writer, const XalanDOMString &version=XalanDOMString(XalanMemMgrs::getDummyMemMgr()), bool doIndent=false, int indent=eDefaultIndentAmount, const XalanDOMString &encoding=XalanDOMString(XalanMemMgrs::getDummyMemMgr()), const XalanDOMString &mediaType=XalanDOMString(XalanMemMgrs::getDummyMemMgr()), const XalanDOMString &doctypeSystem=XalanDOMString(XalanMemMgrs::getDummyMemMgr()), const XalanDOMString &doctypePublic=XalanDOMString(XalanMemMgrs::getDummyMemMgr()), bool xmlDecl=true, const XalanDOMString &standalone=XalanDOMString(XalanMemMgrs::getDummyMemMgr()), eFormat format=OUTPUT_METHOD_XML, bool fBufferData=true, MemoryManagerType &theManager XALAN_DEFAULT_MEMMGR)
virtual const XalanDOMString & getDoctypePublic () const
virtual const XalanDOMString & getDoctypeSystem () const
bool getDoIndent () const
virtual const XalanDOMString & getEncoding () const
bool getEscapeCData () const
virtual int getIndent () const
virtual const XalanDOMString & getMediaType () const
MemoryManagerType & getMemoryManager ()
eFormat getOutputFormat () const
const PrefixResolvergetPrefixResolver () const
bool getShouldWriteXMLHeader () const
const XalanDOMString & getStandalone () const
bool getStripCData () const
const XalanDOMString & getVersion () const
virtual Writer * getWriter () const
eXMLVersion getXMLVersion () const
virtual void ignorableWhitespace (const XMLCh *const chars, const unsigned int length)
bool isXML1_1Version () const
virtual void processingInstruction (const XMLCh *const target, const XMLCh *const data)
virtual void resetDocument ()
virtual void setDocumentLocator (const Locator *const locator)=0
virtual void setDocumentLocator (const LocatorType *const locator)
void setDoIndent (bool value)
void setEscapeCData (bool b)
void setIndent (int value)
void setPrefixResolver (const PrefixResolver *thePrefixResolver)
void setShouldWriteXMLHeader (bool b)
void setStripCData (bool b)
virtual void startDocument ()
virtual void startElement (const XMLCh *const name, AttributeList &attrs)=0
virtual void startElement (const XMLCh *const name, AttributeListType &attrs)

Static Public Member Functions

static FormatterToXMLcreate (MemoryManagerType &theManager, Writer &writer, const XalanDOMString &version=XalanDOMString(XalanMemMgrs::getDummyMemMgr()), bool doIndent=false, int indent=eDefaultIndentAmount, const XalanDOMString &encoding=XalanDOMString(XalanMemMgrs::getDummyMemMgr()), const XalanDOMString &mediaType=XalanDOMString(XalanMemMgrs::getDummyMemMgr()), const XalanDOMString &doctypeSystem=XalanDOMString(XalanMemMgrs::getDummyMemMgr()), const XalanDOMString &doctypePublic=XalanDOMString(XalanMemMgrs::getDummyMemMgr()), bool xmlDecl=true, const XalanDOMString &standalone=XalanDOMString(XalanMemMgrs::getDummyMemMgr()), eFormat format=OUTPUT_METHOD_XML, bool fBufferData=true)

Static Public Attributes

static const XalanDOMChar s_piData []
static const
XalanDOMString::size_type 
s_piDataLength = 3
static const XalanDOMChar s_piTarget []
static const
XalanDOMString::size_type 
s_piTargetLength = 5

Protected Types

typedef void(FormatterToXML::* AccumArrayFunctionType )(const XalanDOMChar[], XalanDOMString::size_type, XalanDOMString::size_type)
typedef void(FormatterToXML::* AccumCharFunctionType )(XalanDOMChar)
typedef void(FormatterToXML::* AccumDOMStringFunctionType )(const XalanDOMString &)
typedef void(FormatterToXML::* AccumStringFunctionType )(const XalanDOMChar *)
enum  eDummyTwo { SPECIALSSIZE = 256 }
typedef void(FormatterToXML::* FlushFunctionType )()

Protected Member Functions

virtual void accumCommentData (const XalanDOMChar *data)
void accumContent (const XalanDOMString &str)
void accumContent (const XalanDOMChar chars[], XalanDOMString::size_type start, XalanDOMString::size_type length)
void accumContent (const XalanDOMChar *chars)
void accumContent (XalanDOMChar ch)
virtual bool accumDefaultEntity (XalanDOMChar ch, bool escLF)
XalanDOMString::size_type accumDefaultEscape (XalanDOMChar ch, XalanDOMString::size_type i, const XalanDOMChar chars[], XalanDOMString::size_type len, bool escLF)
void accumName (const XalanDOMString &str)
void accumName (const XalanDOMChar chars[], XalanDOMString::size_type start, XalanDOMString::size_type length)
void accumName (const XalanDOMChar *chars)
void accumName (XalanDOMChar ch)
bool childNodesWereAdded ()
void flushBytes ()
void flushChars ()
void flushWriter ()
void indent (int n)
void initAttrCharsMap ()
void initCharsMap ()
void openElementForChildren ()
void outputLineSep ()
void setXMLVersion (eXMLVersion theVersion)
bool shouldIndent () const
virtual void writeAttrString (const XalanDOMChar *theString, XalanDOMString::size_type theStringLength)
virtual void writeNormalizedChars (const XalanDOMChar ch[], XalanDOMString::size_type start, XalanDOMString::size_type length, bool isCData)
void writeNumberedEntityReference (unsigned long theNumber)
void writeParentTagEnd ()

Static Protected Member Functions

static bool isUTF16Surrogate (XalanDOMChar ch)
static void throwInvalidCharacterException (unsigned int ch, MemoryManagerType &theManager)
static void throwInvalidUTF16SurrogateException (XalanDOMChar ch, XalanDOMChar next, MemoryManagerType &theManager)
static void throwInvalidUTF16SurrogateException (XalanDOMChar ch, MemoryManagerType &theManager)

Protected Attributes

XalanDOMChar m_attrCharsMap [SPECIALSSIZE]
XalanDOMChar m_charsMap [SPECIALSSIZE]
int m_currentIndent
const XalanDOMString m_doctypePublic
const XalanDOMString m_doctypeSystem
bool m_doIndent
XalanDOMString m_encoding
bool m_encodingIsUTF
bool m_inCData
int m_indent
bool m_ispreserve
bool m_isprevtext
XalanDOMChar m_maxCharacter
bool m_needToOutputDocTypeDecl
bool m_nextIsRaw
const PrefixResolverm_prefixResolver
BoolStackType m_preserves
bool m_shouldWriteXMLHeader
bool m_startNewLine
XalanOutputStream *const m_stream
XalanDOMString m_stringBuffer
bool m_stripCData
Writer *const m_writer

Static Protected Attributes

static const XalanDOMString s_emptyString

Private Types

typedef XalanDOMString::size_type size_type

Private Member Functions

void accumArrayUTF (const XalanDOMChar chars[], XalanDOMString::size_type start, XalanDOMString::size_type length)
void accumArrayUTFDirect (const XalanDOMChar chars[], XalanDOMString::size_type start, XalanDOMString::size_type length)
void accumCharUTF (XalanDOMChar ch)
void accumCharUTFDirect (XalanDOMChar ch)
void accumContentArray (const XalanDOMChar chars[], XalanDOMString::size_type start, XalanDOMString::size_type length)
void accumContentAsByte (XalanDOMChar ch)
void accumContentAsByteDirect (XalanDOMChar ch)
void accumContentAsChar (XalanDOMChar ch)
void accumContentAsCharDirect (XalanDOMChar ch)
void accumContentDOMString (const XalanDOMString &str)
void accumContentString (const XalanDOMChar *chars)
void accumDOMStringUTF (const XalanDOMString &str)
void accumDOMStringUTFDirect (const XalanDOMString &str)
void accumNameArray (const XalanDOMChar chars[], XalanDOMString::size_type start, XalanDOMString::size_type length)
void accumNameAsByte (XalanDOMChar ch)
void accumNameAsByteDirect (XalanDOMChar ch)
void accumNameAsChar (XalanDOMChar ch)
void accumNameAsCharDirect (XalanDOMChar ch)
void accumNameDOMString (const XalanDOMString &str)
void accumNameString (const XalanDOMChar *chars)
void accumNormalizedPIData (const XalanDOMChar *theData, XalanDOMString::size_type theLength)
void accumStringUTF (const XalanDOMChar *chars)
void accumStringUTFDirect (const XalanDOMChar *chars)
 FormatterToXML (const FormatterToXML &)
FormatterToXMLoperator= (const FormatterToXML &)
bool operator== (const FormatterToXML &) const
void outputDocTypeDecl (const XalanDOMChar *name)
void printSpace (int n)
void processAttribute (const XalanDOMChar *name, const XalanDOMChar *value)

Private Attributes

AccumArrayFunctionType m_accumContentArrayFunction
AccumCharFunctionType m_accumContentCharFunction
AccumDOMStringFunctionType m_accumContentDOMStringFunction
AccumStringFunctionType m_accumContentStringFunction
AccumArrayFunctionType m_accumNameArrayFunction
AccumCharFunctionType m_accumNameCharFunction
AccumDOMStringFunctionType m_accumNameDOMStringFunction
AccumStringFunctionType m_accumNameStringFunction
const XalanDOMString m_attrSpecialChars
ByteBufferType m_byteBuf
bool m_bytesEqualChars
DOMCharBufferType m_charBuf
BoolStackType m_elemStack
bool m_escapeCData
FlushFunctionType m_flushFunction
bool m_isXML1_1
const XalanDOMString m_mediaType
const XalanDOMChar * m_newlineString
XalanDOMString::size_type m_newlineStringLength
XalanDOMString::size_type m_pos
bool m_shouldFlush
bool m_spaceBeforeClose
const XalanDOMString m_standalone
const XalanDOMString m_version

Static Private Attributes

static const XalanDOMChar s_defaultVersionString []
static const size_type s_defaultVersionStringLength
static const XalanDOMChar s_doctypeHeaderPublicString []
static const size_type s_doctypeHeaderPublicStringLength
static const XalanDOMChar s_doctypeHeaderStartString []
static const size_type s_doctypeHeaderStartStringLength
static const XalanDOMChar s_doctypeHeaderSystemString []
static const size_type s_doctypeHeaderSystemStringLength
static const XalanDOMChar s_dtdCDATACloseString []
static const size_type s_dtdCDATACloseStringLength
static const
XalanDOMString::size_type 
s_maxBufferSize = 512
static const XalanDOMChar s_xhtmlDocTypeString []
static const size_type s_xhtmlDocTypeStringLength
static const XalanDOMChar s_xmlHeaderEncodingString []
static const size_type s_xmlHeaderEncodingStringLength
static const XalanDOMChar s_xmlHeaderEndString []
static const size_type s_xmlHeaderEndStringLength
static const XalanDOMChar s_xmlHeaderStandaloneString []
static const size_type s_xmlHeaderStandaloneStringLength
static const XalanDOMChar s_xmlHeaderStartString []
static const size_type s_xmlHeaderStartStringLength

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index