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

FormatterToHTML Class Reference

#include <FormatterToHTML.hpp>

Inheritance diagram for FormatterToHTML:

FormatterToXML FormatterListener

List of all members.

Detailed Description

FormatterToHTML formats SAX-style events into HTML.

Definition at line 50 of file FormatterToHTML.hpp.

Public Types

enum  { eDefaultIndentAmount = 0 }
typedef XalanVector< bool > BoolStackType
typedef XalanVector< char > ByteBufferType
typedef XalanVector< XalanDOMChar > DOMCharBufferType
enum  eDummy { eDefaultIndentAmount = 0 }
enum  eFormat {
typedef XalanVector
< XalanHTMLElementsProperties::ElementProperties
enum  eXMLVersion { XML_VERSION_1_0 = 0, XML_VERSION_1_1 = 1 }

Public Member Functions

virtual bool accumDefaultEntity (XalanDOMChar ch, bool escLF)
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)
 FormatterToHTML (Writer &writer, 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 doIndent=true, int indent=eDefaultIndentAmount, bool escapeURLs=true, bool omitMetaTag=false, 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
bool getEscapeURLs () 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 setEscapeURLs (bool flag)
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 FormatterToHTMLcreate (MemoryManagerType &theManager, Writer &writer, const XalanDOMString &encoding, const XalanDOMString &mediaType, const XalanDOMString &doctypeSystem, const XalanDOMString &doctypePublic, bool doIndent, int indent, bool escapeURLs, bool omitMetaTag)

Static Public Attributes

static const XalanDOMChar s_piData []
static const
s_piDataLength = 3
static const XalanDOMChar s_piTarget []
static const
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)
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 openElementForChildren ()
void outputLineSep ()
void setXMLVersion (eXMLVersion theVersion)
bool shouldIndent () const
virtual void writeAttrString (const XalanDOMChar *theString, XalanDOMString::size_type theStringLength)
void writeCharacters (const XalanDOMChar *theString, XalanDOMString::size_type theLength)
void writeCharacters (const XalanDOMString &theString)
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

Private Types

typedef XalanDOMString::size_type size_type

Private Member Functions

void accumHexNumber (XalanDOMChar theChar)
void copyEntityIntoBuffer (const XalanDOMString &s)
void copyEntityIntoBuffer (const XalanDOMChar *s, XalanDOMString::size_type theLength)
void initAttrCharsMap ()
void initCharsMap ()
bool popHasNamespace ()
virtual void processAttribute (const XalanDOMChar *name, const XalanDOMChar *value, const XalanHTMLElementsProperties::ElementProperties &elemProperties)
bool pushHasNamespace (const XalanDOMChar *theElementName)
void writeAttrURI (const XalanDOMChar *theString, XalanDOMString::size_type theStringLength)

Private Attributes

XalanDOMString m_currentElementName
int m_elementLevel
ElementPropertiesStackType m_elementPropertiesStack
bool m_escapeURLs
BoolStackType m_hasNamespaceStack
bool m_inBlockElem
BoolStackType m_inScriptElemStack
bool m_isFirstElement
BoolStackType m_isRawStack
bool m_isScriptOrStyleElem
bool m_isUTF8
bool m_omitMetaTag

Static Private Attributes

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 XalanDOMString s_emptyString
static const Entity s_entities []
static const Entity *const s_lastEntity
static const XalanDOMChar s_metaString []
static const size_type s_metaStringLength


struct  Entity

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

Generated by  Doxygen 1.6.0   Back to index