XalanXMLSerializerBase serves as a base class for XML serializers based on FormatterListener events.
More...
#include <XalanXMLSerializerBase.hpp>
Inherits FormatterListener.
Inherited by FormatterToXMLUnicode< UnicodeWriter, ConstantsType, CharPredicate, IndentHandler, XMLVersion >.
|
enum | { eBufferSize = 512
} |
|
enum | {
eNone = 0u,
eAttr = 1u,
eBoth = 2u,
eForb = 4u,
eCRFb = 5u
} |
|
typedef XalanVector< bool > | BoolStackType |
|
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 |
|
typedef XalanSize_t | size_type |
|
|
| 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 |
| Receive notification of character data. More...
|
|
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) |
| Receive notification of cdata. More...
|
|
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) |
|
| 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 | endDocument ()=0 |
|
virtual Writer * | getWriter () const |
|
virtual const XalanDOMString & | getMediaType () const |
|
virtual int | getIndent () const |
|
XalanXMLSerializerBase serves as a base class for XML serializers based on FormatterListener events.
Definition at line 58 of file XalanXMLSerializerBase.hpp.
◆ BoolStackType
◆ anonymous enum
◆ anonymous enum
◆ XalanXMLSerializerBase()
Constructor.
- Parameters
-
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 |
◆ ~XalanXMLSerializerBase()
virtual XalanXMLSerializerBase::~XalanXMLSerializerBase |
( |
| ) |
|
|
virtual |
◆ cdata()
virtual void XalanXMLSerializerBase::cdata |
( |
const XMLCh *const |
ch, |
|
|
const size_type |
length |
|
) |
| |
|
virtual |
Receive notification of cdata.
The Parser will call this method to report each chunk of character data. SAX parsers may return all contiguous character data in a single chunk, or they may split it into several chunks; however, all of the characters in any single event must come from the same external entity, so that the Locator provides useful information.
The application must not attempt to read from the array outside of the specified range.
Note that some parsers will report whitespace using the ignorableWhitespace() method rather than this one (validating parsers must do so).
- Parameters
-
ch | pointer to characters from the XML document |
length | number of characters to read from the array |
- Exceptions
-
Implements FormatterListener.
◆ characters()
virtual void XalanXMLSerializerBase::characters |
( |
const XMLCh *const |
chars, |
|
|
const size_type |
length |
|
) |
| |
|
virtual |
◆ charactersRaw()
virtual void XalanXMLSerializerBase::charactersRaw |
( |
const XMLCh *const |
chars, |
|
|
const size_type |
length |
|
) |
| |
|
pure virtual |
◆ childNodesWereAdded()
bool XalanXMLSerializerBase::childNodesWereAdded |
( |
| ) |
|
|
inlineprotected |
Determine if an element ever had any children added.
- Returns
- true if the children were added, false if not.
Definition at line 640 of file XalanXMLSerializerBase.hpp.
◆ comment()
virtual void XalanXMLSerializerBase::comment |
( |
const XMLCh *const |
data | ) |
|
|
pure virtual |
◆ decodeUTF16SurrogatePair()
static XalanUnicodeChar XalanXMLSerializerBase::decodeUTF16SurrogatePair |
( |
XalanDOMChar |
theHighSurrogate, |
|
|
XalanDOMChar |
theLowSurrogate, |
|
|
MemoryManager & |
theManager |
|
) |
| |
|
staticprotected |
◆ endElement()
virtual void XalanXMLSerializerBase::endElement |
( |
const XMLCh *const |
name | ) |
|
|
pure virtual |
◆ entityReference()
virtual void XalanXMLSerializerBase::entityReference |
( |
const XMLCh *const |
name | ) |
|
|
pure virtual |
◆ flushBuffer()
virtual void XalanXMLSerializerBase::flushBuffer |
( |
| ) |
|
|
protectedpure virtual |
◆ generateDoctypeDecl()
void XalanXMLSerializerBase::generateDoctypeDecl |
( |
const XalanDOMChar * |
name | ) |
|
|
inlineprotected |
◆ getDoctypePublic()
virtual const XalanDOMString& XalanXMLSerializerBase::getDoctypePublic |
( |
| ) |
const |
|
virtual |
◆ getDoctypeSystem()
virtual const XalanDOMString& XalanXMLSerializerBase::getDoctypeSystem |
( |
| ) |
const |
|
virtual |
◆ getEncoding()
virtual const XalanDOMString& XalanXMLSerializerBase::getEncoding |
( |
| ) |
const |
|
virtual |
◆ getMemoryManager()
MemoryManager& XalanXMLSerializerBase::getMemoryManager |
( |
| ) |
|
|
inline |
◆ getNeedToOutputDoctypeDecl()
bool XalanXMLSerializerBase::getNeedToOutputDoctypeDecl |
( |
| ) |
const |
|
inlineprotected |
◆ getShouldWriteXMLHeader()
bool XalanXMLSerializerBase::getShouldWriteXMLHeader |
( |
| ) |
const |
|
inline |
◆ getStandalone()
◆ getVersion()
◆ ignorableWhitespace()
virtual void XalanXMLSerializerBase::ignorableWhitespace |
( |
const XMLCh *const |
chars, |
|
|
const size_type |
length |
|
) |
| |
|
virtual |
◆ initialize()
static void XalanXMLSerializerBase::initialize |
( |
MemoryManager & |
theManager | ) |
|
|
static |
◆ isUTF16HighSurrogate()
static bool XalanXMLSerializerBase::isUTF16HighSurrogate |
( |
XalanDOMChar |
theChar | ) |
|
|
inlinestaticprotected |
◆ isUTF16LowSurrogate()
static bool XalanXMLSerializerBase::isUTF16LowSurrogate |
( |
XalanDOMChar |
theChar | ) |
|
|
inlinestaticprotected |
◆ markParentForChildren()
bool XalanXMLSerializerBase::markParentForChildren |
( |
| ) |
|
|
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.
- Returns
- true if the parent element has not been previously marked for children.
Definition at line 593 of file XalanXMLSerializerBase.hpp.
◆ openElementForChildren()
void XalanXMLSerializerBase::openElementForChildren |
( |
| ) |
|
|
inlineprotected |
◆ outputNewline()
virtual void XalanXMLSerializerBase::outputNewline |
( |
| ) |
|
|
protectedpure virtual |
◆ outsideDocumentElement()
bool XalanXMLSerializerBase::outsideDocumentElement |
( |
| ) |
const |
|
inlineprotected |
◆ processingInstruction()
virtual void XalanXMLSerializerBase::processingInstruction |
( |
const XMLCh *const |
target, |
|
|
const XMLCh *const |
data |
|
) |
| |
|
virtual |
◆ resetDocument()
virtual void XalanXMLSerializerBase::resetDocument |
( |
| ) |
|
|
virtual |
◆ setDocumentLocator()
virtual void XalanXMLSerializerBase::setDocumentLocator |
( |
const Locator *const |
locator | ) |
|
|
virtual |
◆ setShouldWriteXMLHeader()
void XalanXMLSerializerBase::setShouldWriteXMLHeader |
( |
bool |
b | ) |
|
|
inline |
◆ startDocument()
virtual void XalanXMLSerializerBase::startDocument |
( |
| ) |
|
|
virtual |
◆ startElement()
virtual void XalanXMLSerializerBase::startElement |
( |
const XMLCh *const |
name, |
|
|
AttributeList & |
attrs |
|
) |
| |
|
pure virtual |
◆ terminate()
static void XalanXMLSerializerBase::terminate |
( |
| ) |
|
|
static |
◆ throwInvalidCharacterException()
static void XalanXMLSerializerBase::throwInvalidCharacterException |
( |
XalanUnicodeChar |
ch, |
|
|
MemoryManager & |
theManager |
|
) |
| |
|
staticprotected |
Throw an exception when an invalid character is encountered.
- Parameters
-
ch | The first character in the surrogate |
next | The next character in the surrogate |
◆ throwInvalidUTF16SurrogateException() [1/2]
static void XalanXMLSerializerBase::throwInvalidUTF16SurrogateException |
( |
XalanDOMChar |
ch, |
|
|
MemoryManager & |
theManager |
|
) |
| |
|
staticprotected |
Throw an exception when an invalid surrogate is encountered.
- Parameters
-
ch | The first character in the surrogate |
◆ throwInvalidUTF16SurrogateException() [2/2]
static void XalanXMLSerializerBase::throwInvalidUTF16SurrogateException |
( |
XalanDOMChar |
ch, |
|
|
XalanDOMChar |
next, |
|
|
MemoryManager & |
theManager |
|
) |
| |
|
staticprotected |
Throw an exception when an invalid surrogate is encountered.
- Parameters
-
ch | The first character in the surrogate |
next | The next character in the surrogate |
◆ throwInvalidXMLCharacterException()
static void XalanXMLSerializerBase::throwInvalidXMLCharacterException |
( |
XalanUnicodeChar |
ch, |
|
|
const XalanDOMString & |
theXMLversion, |
|
|
MemoryManager & |
theManager |
|
) |
| |
|
staticprotected |
Throw an exception when an invalid character for the specific XML version is encountered.
- Parameters
-
ch | The first character in the surrogate |
next | The next character in the surrogate |
◆ writeCDATA()
virtual void XalanXMLSerializerBase::writeCDATA |
( |
const XMLCh * |
chars, |
|
|
size_type |
length |
|
) |
| |
|
protectedpure virtual |
◆ writeCharacters()
virtual void XalanXMLSerializerBase::writeCharacters |
( |
const XMLCh * |
chars, |
|
|
size_type |
length |
|
) |
| |
|
protectedpure virtual |
◆ writeDoctypeDecl()
virtual void XalanXMLSerializerBase::writeDoctypeDecl |
( |
const XalanDOMChar * |
name | ) |
|
|
protectedpure virtual |
◆ writeProcessingInstruction()
virtual void XalanXMLSerializerBase::writeProcessingInstruction |
( |
const XMLCh * |
target, |
|
|
const XMLCh * |
data |
|
) |
| |
|
protectedpure virtual |
◆ writeXMLHeader()
virtual void XalanXMLSerializerBase::writeXMLHeader |
( |
| ) |
|
|
protectedpure virtual |
◆ m_doctypePublic
◆ m_doctypeSystem
◆ m_encoding
◆ m_nextIsRaw
bool XalanXMLSerializerBase::m_nextIsRaw |
|
protected |
◆ m_spaceBeforeClose
bool XalanXMLSerializerBase::m_spaceBeforeClose |
|
protected |
◆ m_standalone
◆ m_version
◆ s_1_0String
◆ s_1_1String
The documentation for this class was generated from the following file: