Xalan-C++ API Reference
1.12.0
|
XalanXMLSerializerBase serves as a base class for XML serializers based on FormatterListener events. More...
#include <xalanc/XMLSupport/XalanXMLSerializerBase.hpp>
Classes | |
class | CharFunctor1_0 |
class | CharFunctor1_1 |
class | UTF16 |
class | UTF8 |
Public Types | |
enum | { eBufferSize = 512 } |
enum | { eNone = 0u, eAttr = 1u, eBoth = 2u, eForb = 4u, eCRFb = 5u } |
typedef XalanVector< bool > | BoolStackType |
Public Types inherited from xalanc::FormatterListener | |
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 xercesc::DocumentHandler | ParentType |
typedef XalanSize_t | size_type |
Public Member Functions | |
XalanXMLSerializerBase (MemoryManager &theManager, eXMLVersion theXMLVersion, const XalanDOMString &theEncoding, const XalanDOMString &theDoctypeSystem, const XalanDOMString &theDoctypePublic, bool xmlDecl, const XalanDOMString &theStandalone) | |
Constructor. More... | |
virtual | ~XalanXMLSerializerBase () |
MemoryManager & | getMemoryManager () |
virtual void | setDocumentLocator (const Locator *const locator) |
virtual void | startDocument () |
virtual void | startElement (const XMLCh *const name, AttributeList &attrs)=0 |
virtual void | endElement (const XMLCh *const name)=0 |
virtual void | characters (const XMLCh *const chars, const size_type length) |
virtual void | charactersRaw (const XMLCh *const chars, const size_type length)=0 |
virtual void | entityReference (const XMLCh *const name)=0 |
Receive notification of a entityReference. More... | |
virtual void | ignorableWhitespace (const XMLCh *const chars, const size_type length) |
virtual void | processingInstruction (const XMLCh *const target, const XMLCh *const data) |
virtual void | resetDocument () |
virtual void | comment (const XMLCh *const data)=0 |
Called when a Comment is to be constructed. More... | |
virtual void | cdata (const XMLCh *const ch, const size_type length) |
virtual const XalanDOMString & | getDoctypeSystem () const |
virtual const XalanDOMString & | getDoctypePublic () const |
virtual const XalanDOMString & | getEncoding () const |
const XalanDOMString & | getVersion () const |
const XalanDOMString & | getStandalone () const |
bool | getShouldWriteXMLHeader () const |
void | setShouldWriteXMLHeader (bool b) |
Public Member Functions inherited from xalanc::FormatterListener | |
FormatterListener (eFormat theFormat) | |
virtual | ~FormatterListener () |
eFormat | getOutputFormat () const |
Get the output format for the instance. More... | |
eXMLVersion | getXMLVersion () const |
Get the version of XML the FormatterListener is generating. More... | |
bool | isXML1_1Version () const |
Determine if the version of XML output is 1.1. More... | |
const PrefixResolver * | getPrefixResolver () const |
Get the PrefixResolver for the FormatterListener. More... | |
void | setPrefixResolver (const PrefixResolver *thePrefixResolver) |
Set the PrefixResolver for the FormatterListener. More... | |
virtual void | charactersRaw (const XMLCh *const chars, const size_type length)=0 |
Receive notification of character data. More... | |
virtual void | cdata (const XMLCh *const ch, const size_type length)=0 |
Receive notification of cdata. More... | |
virtual void | characters (const XMLCh *const chars, const size_type length)=0 |
virtual void | endDocument ()=0 |
virtual void | ignorableWhitespace (const XMLCh *const chars, const size_type length)=0 |
virtual Writer * | getWriter () const |
virtual const XalanDOMString & | getMediaType () const |
virtual int | getIndent () const |
Static Public Member Functions | |
static void | initialize (MemoryManager &theManager) |
Perform static initialization. More... | |
static void | terminate () |
Perform static shut down. More... | |
Static Public Attributes | |
static const XalanDOMString & | s_1_0String |
static const XalanDOMString & | s_1_1String |
Static Public Attributes inherited from xalanc::FormatterListener | |
static const XalanDOMChar | s_piTarget [] |
static const XalanDOMChar | s_piData [] |
static const XalanDOMString::size_type | s_piTargetLength |
static const XalanDOMString::size_type | s_piDataLength |
Protected Member Functions | |
virtual void | writeXMLHeader ()=0 |
virtual void | flushBuffer ()=0 |
virtual void | writeDoctypeDecl (const XalanDOMChar *name)=0 |
virtual void | writeProcessingInstruction (const XMLCh *target, const XMLCh *data)=0 |
virtual void | writeCharacters (const XMLCh *chars, size_type length)=0 |
virtual void | writeCDATA (const XMLCh *chars, size_type length)=0 |
virtual void | outputNewline ()=0 |
bool | markParentForChildren () |
Mark the parent element as having a child. More... | |
bool | getNeedToOutputDoctypeDecl () const |
Determine if it a DOCTYPE declaration needs to be written. More... | |
void | openElementForChildren () |
Open an element for possibile children. More... | |
bool | outsideDocumentElement () const |
bool | childNodesWereAdded () |
Determine if an element ever had any children added. More... | |
void | generateDoctypeDecl (const XalanDOMChar *name) |
Protected Member Functions inherited from xalanc::FormatterListener | |
void | setXMLVersion (eXMLVersion theVersion) |
Set the output version during serializing. More... | |
Static Protected Member Functions | |
static bool | isUTF16HighSurrogate (XalanDOMChar theChar) |
static bool | isUTF16LowSurrogate (XalanDOMChar theChar) |
static XalanUnicodeChar | decodeUTF16SurrogatePair (XalanDOMChar theHighSurrogate, XalanDOMChar theLowSurrogate, MemoryManager &theManager) |
static void | throwInvalidUTF16SurrogateException (XalanDOMChar ch, MemoryManager &theManager) |
Throw an exception when an invalid surrogate is encountered. More... | |
static void | throwInvalidUTF16SurrogateException (XalanDOMChar ch, XalanDOMChar next, MemoryManager &theManager) |
Throw an exception when an invalid surrogate is encountered. More... | |
static void | throwInvalidCharacterException (XalanUnicodeChar ch, MemoryManager &theManager) |
Throw an exception when an invalid character is encountered. More... | |
static void | throwInvalidXMLCharacterException (XalanUnicodeChar ch, const XalanDOMString &theXMLversion, MemoryManager &theManager) |
Throw an exception when an invalid character for the specific XML version is encountered. More... | |
Protected Attributes | |
bool | m_nextIsRaw |
Tell if the next text should be raw. More... | |
bool | m_spaceBeforeClose |
Add space before '/>' for XHTML. More... | |
const XalanDOMString | m_doctypeSystem |
The System ID for the doc type. More... | |
const XalanDOMString | m_doctypePublic |
The public ID for the doc type. More... | |
const XalanDOMString & | m_version |
Tells the XML version, for writing out to the XML decl. More... | |
const XalanDOMString | m_standalone |
Text for standalone part of header. More... | |
const XalanDOMString | m_encoding |
Protected Attributes inherited from xalanc::FormatterListener | |
const PrefixResolver * | m_prefixResolver |
Additional Inherited Members | |
Static Protected Attributes inherited from xalanc::FormatterListener | |
static const XalanDOMString | s_emptyString |
XalanXMLSerializerBase serves as a base class for XML serializers based on FormatterListener events.
Definition at line 58 of file XalanXMLSerializerBase.hpp.
typedef XalanVector<bool> xalanc::XalanXMLSerializerBase::BoolStackType |
Definition at line 191 of file XalanXMLSerializerBase.hpp.
anonymous enum |
Enumerator | |
---|---|
eBufferSize |
Definition at line 430 of file XalanXMLSerializerBase.hpp.
anonymous enum |
Enumerator | |
---|---|
eNone | |
eAttr | |
eBoth | |
eForb | |
eCRFb |
Definition at line 542 of file XalanXMLSerializerBase.hpp.
xalanc::XalanXMLSerializerBase::XalanXMLSerializerBase | ( | MemoryManager & | theManager, |
eXMLVersion | theXMLVersion, | ||
const XalanDOMString & | theEncoding, | ||
const XalanDOMString & | theDoctypeSystem, | ||
const XalanDOMString & | theDoctypePublic, | ||
bool | xmlDecl, | ||
const XalanDOMString & | theStandalone | ||
) |
Constructor.
theManager | The MemoryManager instance to use for any memory allocations |
doctypeSystem | system identifier to be used in the document type declaration |
doctypePublic | public identifier to be used in the document type declaration |
xmlDecl | true if the XSLT processor should output an XML declaration |
theStandalone | The string the XSLT processor should output for the standalone document declaration |
|
virtual |
|
virtual |
|
virtual |
|
pure virtual |
|
inlineprotected |
Determine if an element ever had any children added.
Definition at line 640 of file XalanXMLSerializerBase.hpp.
|
pure virtual |
Called when a Comment is to be constructed.
data | pointer to comment data |
SAXException |
Implements xalanc::FormatterListener.
Implemented in xalanc::FormatterToXMLUnicode< UnicodeWriter, ConstantsType, CharPredicate, IndentHandler, XMLVersion >.
|
staticprotected |
|
pure virtual |
|
pure virtual |
Receive notification of a entityReference.
data | pointer to characters from the XML document |
SAXException |
Implements xalanc::FormatterListener.
Implemented in xalanc::FormatterToXMLUnicode< UnicodeWriter, ConstantsType, CharPredicate, IndentHandler, XMLVersion >.
|
protectedpure virtual |
|
inlineprotected |
Definition at line 655 of file XalanXMLSerializerBase.hpp.
|
virtual |
Reimplemented from xalanc::FormatterListener.
|
virtual |
Reimplemented from xalanc::FormatterListener.
|
virtual |
Reimplemented from xalanc::FormatterListener.
|
inline |
Definition at line 102 of file XalanXMLSerializerBase.hpp.
|
inlineprotected |
Determine if it a DOCTYPE declaration needs to be written.
Definition at line 614 of file XalanXMLSerializerBase.hpp.
|
inline |
Definition at line 180 of file XalanXMLSerializerBase.hpp.
|
inline |
Definition at line 174 of file XalanXMLSerializerBase.hpp.
|
inline |
Definition at line 168 of file XalanXMLSerializerBase.hpp.
|
virtual |
|
static |
Perform static initialization.
See class XMLSupportInit.
|
inlinestaticprotected |
Definition at line 700 of file XalanXMLSerializerBase.hpp.
|
inlinestaticprotected |
Definition at line 706 of file XalanXMLSerializerBase.hpp.
|
inlineprotected |
Mark the parent element as having a child.
If this is the first child, return true, otherwise, return false. This allows the child element to determine if the parent tag has already been closed.
Definition at line 593 of file XalanXMLSerializerBase.hpp.
|
inlineprotected |
Open an element for possibile children.
Definition at line 623 of file XalanXMLSerializerBase.hpp.
|
protectedpure virtual |
|
inlineprotected |
Definition at line 629 of file XalanXMLSerializerBase.hpp.
|
virtual |
Implements xalanc::FormatterListener.
|
virtual |
Implements xalanc::FormatterListener.
|
virtual |
Implements xalanc::FormatterListener.
|
inline |
Definition at line 186 of file XalanXMLSerializerBase.hpp.
|
virtual |
Implements xalanc::FormatterListener.
|
pure virtual |
|
static |
Perform static shut down.
See class XMLSupportInit.
|
staticprotected |
Throw an exception when an invalid character is encountered.
ch | The first character in the surrogate |
next | The next character in the surrogate |
|
staticprotected |
Throw an exception when an invalid surrogate is encountered.
ch | The first character in the surrogate |
|
staticprotected |
Throw an exception when an invalid surrogate is encountered.
ch | The first character in the surrogate |
next | The next character in the surrogate |
|
staticprotected |
Throw an exception when an invalid character for the specific XML version is encountered.
ch | The first character in the surrogate |
next | The next character in the surrogate |
|
protectedpure virtual |
|
protectedpure virtual |
|
protectedpure virtual |
|
protectedpure virtual |
|
protectedpure virtual |
|
protected |
The public ID for the doc type.
Definition at line 685 of file XalanXMLSerializerBase.hpp.
|
protected |
The System ID for the doc type.
Definition at line 680 of file XalanXMLSerializerBase.hpp.
|
protected |
Definition at line 697 of file XalanXMLSerializerBase.hpp.
|
protected |
Tell if the next text should be raw.
Definition at line 670 of file XalanXMLSerializerBase.hpp.
|
protected |
Add space before '/>' for XHTML.
Definition at line 675 of file XalanXMLSerializerBase.hpp.
|
protected |
Text for standalone part of header.
Definition at line 695 of file XalanXMLSerializerBase.hpp.
|
protected |
Tells the XML version, for writing out to the XML decl.
Definition at line 690 of file XalanXMLSerializerBase.hpp.
|
static |
Definition at line 194 of file XalanXMLSerializerBase.hpp.
|
static |
Definition at line 196 of file XalanXMLSerializerBase.hpp.
Copyright © 1999-2020 The Apache Software Foundation. All Rights Reserved.
Generated on Sun May 31 2020 10:37:38 for Xalan-C++ API Reference by 1.8.17