FormatterToXML formats SAX-style events into XML. More...
#include <FormatterToXML.hpp>
Inherits FormatterListener.
Inherited by FormatterToHTML.
FormatterToXML formats SAX-style events into XML.
Definition at line 59 of file FormatterToXML.hpp.
typedef void(FormatterToXML::* FormatterToXML::AccumArrayFunctionType)(const XalanDOMChar[], size_type, size_type) [protected] |
Definition at line 297 of file FormatterToXML.hpp.
typedef void(FormatterToXML::* FormatterToXML::AccumCharFunctionType)(XalanDOMChar) [protected] |
Definition at line 291 of file FormatterToXML.hpp.
typedef void(FormatterToXML::* FormatterToXML::AccumDOMStringFunctionType)(const XalanDOMString &) [protected] |
Definition at line 295 of file FormatterToXML.hpp.
typedef void(FormatterToXML::* FormatterToXML::AccumStringFunctionType)(const XalanDOMChar *) [protected] |
Definition at line 293 of file FormatterToXML.hpp.
typedef XalanVector<bool> FormatterToXML::BoolStackType |
Definition at line 268 of file FormatterToXML.hpp.
typedef XalanVector<char> FormatterToXML::ByteBufferType |
Definition at line 270 of file FormatterToXML.hpp.
typedef XalanVector<XalanDOMChar> FormatterToXML::DOMCharBufferType |
Definition at line 269 of file FormatterToXML.hpp.
typedef void(FormatterToXML::* FormatterToXML::FlushFunctionType)() [protected] |
Definition at line 302 of file FormatterToXML.hpp.
Definition at line 63 of file FormatterToXML.hpp.
enum FormatterToXML::eDummyTwo [protected] |
Definition at line 591 of file FormatterToXML.hpp.
FormatterToXML::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 , |
|||
MemoryManager & | theManager = XalanMemMgrs::getDefaultXercesMemMgr() | |||
) |
Constructor for customized encoding and doctype.
writer | character output stream to use | |
version | version of the output method | |
doIndent | true if output is to be indented | |
indent | number of spaces to indent at each nesting level | |
encoding | character encoding in use by writer | |
mediaType | media type (MIME content type) of the data | |
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 | |
standalone | true if the XSLT processor should output a standalone document declaration | |
format | should be used only by derived classes. | |
fBufferData | If true, data will be buffered in the formatter |
virtual FormatterToXML::~FormatterToXML | ( | ) | [virtual] |
virtual void FormatterToXML::accumCommentData | ( | const XalanDOMChar * | data | ) | [protected, virtual] |
Write the data for a comment.
data | The comment's data. |
Reimplemented in FormatterToHTML.
void FormatterToXML::accumContent | ( | const XalanDOMChar * | chars | ) | [inline, protected] |
Append a null-terminated array of wide characters to the buffer.
the array to append
Definition at line 359 of file FormatterToXML.hpp.
void FormatterToXML::accumContent | ( | const XalanDOMChar | chars[], | |
size_type | start, | |||
size_type | length | |||
) | [inline, protected] |
Append an array of wide character to the buffer.
the array to append the offset into the array to start from the number of characters to append
Definition at line 396 of file FormatterToXML.hpp.
void FormatterToXML::accumContent | ( | const XalanDOMString & | str | ) | [inline, protected] |
Append a string to the buffer.
str | the string to append |
Definition at line 429 of file FormatterToXML.hpp.
void FormatterToXML::accumContent | ( | XalanDOMChar | ch | ) | [inline, protected] |
Append a wide character to the buffer.
the character to append.
Definition at line 327 of file FormatterToXML.hpp.
virtual bool FormatterToXML::accumDefaultEntity | ( | XalanDOMChar | ch, | |
bool | escLF | |||
) | [protected, virtual] |
Handle one of the default entities, return false if it is not a default entity.
Reimplemented in FormatterToHTML.
size_type FormatterToXML::accumDefaultEscape | ( | XalanDOMChar | ch, | |
size_type | i, | |||
const XalanDOMChar | chars[], | |||
size_type | len, | |||
bool | escLF | |||
) | [protected] |
Escape and accum a character.
void FormatterToXML::accumName | ( | XalanDOMChar | ch | ) | [inline, protected] |
Append a wide character to the buffer.
Characters that are not representable in the encoding are not written as entities.
the character to append.
Definition at line 314 of file FormatterToXML.hpp.
void FormatterToXML::accumName | ( | const XalanDOMChar * | chars | ) | [inline, protected] |
Append a null-terminated array of wide characters to the buffer.
Characters that are not representable in the encoding are not written as entities.
the array to append
Definition at line 345 of file FormatterToXML.hpp.
void FormatterToXML::accumName | ( | const XalanDOMChar | chars[], | |
size_type | start, | |||
size_type | length | |||
) | [inline, protected] |
Append an array of wide character to the buffer.
Characters that are not representable in the encoding are not written as entities.
the array to append the offset into the array to start from the number of characters to append
Definition at line 378 of file FormatterToXML.hpp.
void FormatterToXML::accumName | ( | const XalanDOMString & | str | ) | [inline, protected] |
Append a string to the buffer.
Characters that are not representable in the encoding are not written as entities.
str | the string to append |
Definition at line 416 of file FormatterToXML.hpp.
virtual void FormatterToXML::cdata | ( | const XMLCh *const | ch, | |
const size_type | length | |||
) | [virtual] |
Reimplemented in FormatterToHTML.
virtual void FormatterToXML::characters | ( | const XMLCh *const | chars, | |
const size_type | length | |||
) | [virtual] |
Reimplemented in FormatterToHTML.
virtual void FormatterToXML::charactersRaw | ( | const XMLCh *const | chars, | |
const size_type | length | |||
) | [virtual] |
bool FormatterToXML::childNodesWereAdded | ( | ) | [protected] |
virtual void FormatterToXML::comment | ( | const XMLCh *const | data | ) | [virtual] |
Called when a Comment is to be constructed.
data | pointer to comment data |
SAXException |
Implements FormatterListener.
static FormatterToXML* FormatterToXML::create | ( | MemoryManager & | 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] |
virtual void FormatterToXML::endDocument | ( | ) | [virtual] |
Implements FormatterListener.
Reimplemented in FormatterToHTML.
virtual void FormatterToXML::endElement | ( | const XMLCh *const | name | ) | [virtual] |
Implements FormatterListener.
Reimplemented in FormatterToHTML.
virtual void FormatterToXML::entityReference | ( | const XMLCh *const | name | ) | [virtual] |
Receive notification of a entityReference.
data | pointer to characters from the XML document |
SAXException |
Implements FormatterListener.
Reimplemented in FormatterToHTML.
void FormatterToXML::flushBytes | ( | ) | [protected] |
Flush the byte buffer.
void FormatterToXML::flushChars | ( | ) | [protected] |
Flush the char buffer.
void FormatterToXML::flushWriter | ( | ) | [protected] |
virtual const XalanDOMString& FormatterToXML::getDoctypePublic | ( | ) | const [virtual] |
Reimplemented from FormatterListener.
virtual const XalanDOMString& FormatterToXML::getDoctypeSystem | ( | ) | const [virtual] |
Reimplemented from FormatterListener.
bool FormatterToXML::getDoIndent | ( | ) | const [inline] |
Definition at line 250 of file FormatterToXML.hpp.
virtual const XalanDOMString& FormatterToXML::getEncoding | ( | ) | const [virtual] |
Reimplemented from FormatterListener.
bool FormatterToXML::getEscapeCData | ( | ) | const [inline] |
Definition at line 238 of file FormatterToXML.hpp.
virtual int FormatterToXML::getIndent | ( | ) | const [virtual] |
Reimplemented from FormatterListener.
virtual const XalanDOMString& FormatterToXML::getMediaType | ( | ) | const [virtual] |
Reimplemented from FormatterListener.
MemoryManager& FormatterToXML::getMemoryManager | ( | ) | [inline] |
Definition at line 124 of file FormatterToXML.hpp.
bool FormatterToXML::getShouldWriteXMLHeader | ( | ) | const [inline] |
Definition at line 214 of file FormatterToXML.hpp.
const XalanDOMString& FormatterToXML::getStandalone | ( | ) | const [inline] |
Definition at line 208 of file FormatterToXML.hpp.
bool FormatterToXML::getStripCData | ( | ) | const [inline] |
Definition at line 226 of file FormatterToXML.hpp.
const XalanDOMString& FormatterToXML::getVersion | ( | ) | const [inline] |
Definition at line 202 of file FormatterToXML.hpp.
virtual Writer* FormatterToXML::getWriter | ( | ) | const [virtual] |
Reimplemented from FormatterListener.
virtual void FormatterToXML::ignorableWhitespace | ( | const XMLCh *const | chars, | |
const size_type | length | |||
) | [virtual] |
void FormatterToXML::indent | ( | int | n | ) | [protected] |
Prints a newline character and n spaces.
n | Number of spaces to print. |
void FormatterToXML::initAttrCharsMap | ( | ) | [protected] |
Set the attribute characters what will require special mapping.
void FormatterToXML::initCharsMap | ( | ) | [protected] |
Set the output characters what will require special mapping.
static bool FormatterToXML::isUTF16Surrogate | ( | XalanDOMChar | ch | ) | [inline, static, protected] |
Definition at line 586 of file FormatterToXML.hpp.
void FormatterToXML::openElementForChildren | ( | ) | [protected] |
void FormatterToXML::outputLineSep | ( | ) | [protected] |
Output a line break.
virtual void FormatterToXML::processingInstruction | ( | const XMLCh *const | target, | |
const XMLCh *const | data | |||
) | [virtual] |
Implements FormatterListener.
Reimplemented in FormatterToHTML.
virtual void FormatterToXML::resetDocument | ( | ) | [virtual] |
Implements FormatterListener.
virtual void FormatterToXML::setDocumentLocator | ( | const Locator *const | locator | ) | [virtual] |
Implements FormatterListener.
void FormatterToXML::setDoIndent | ( | bool | value | ) | [inline] |
Definition at line 256 of file FormatterToXML.hpp.
void FormatterToXML::setEscapeCData | ( | bool | b | ) | [inline] |
Definition at line 244 of file FormatterToXML.hpp.
void FormatterToXML::setIndent | ( | int | value | ) | [inline] |
Definition at line 262 of file FormatterToXML.hpp.
void FormatterToXML::setShouldWriteXMLHeader | ( | bool | b | ) | [inline] |
Definition at line 220 of file FormatterToXML.hpp.
void FormatterToXML::setStripCData | ( | bool | b | ) | [inline] |
Definition at line 232 of file FormatterToXML.hpp.
bool FormatterToXML::shouldIndent | ( | ) | const [inline, protected] |
Definition at line 490 of file FormatterToXML.hpp.
virtual void FormatterToXML::startDocument | ( | ) | [virtual] |
Implements FormatterListener.
Reimplemented in FormatterToHTML.
virtual void FormatterToXML::startElement | ( | const XMLCh *const | name, | |
AttributeListType & | attrs | |||
) | [virtual] |
Reimplemented in FormatterToHTML.
static void FormatterToXML::throwInvalidCharacterException | ( | XalanUnicodeChar | ch, | |
MemoryManager & | theManager | |||
) | [static, protected] |
Throw an exception when an invalid XML character is encountered.
ch | The first character in the surrogate | |
next | The next character in the surrogate |
static void FormatterToXML::throwInvalidUTF16SurrogateException | ( | XalanDOMChar | ch, | |
MemoryManager & | theManager | |||
) | [static, protected] |
Throw an exception when an invalid surrogate is encountered.
ch | The first character in the surrogate | |
theManager | The MemoryManager instance to use |
static void FormatterToXML::throwInvalidUTF16SurrogateException | ( | XalanDOMChar | ch, | |
XalanDOMChar | next, | |||
MemoryManager & | theManager | |||
) | [static, protected] |
Throw an exception when an invalid surrogate is encountered.
ch | The first character in the surrogate | |
next | The next character in the surrogate | |
theManager | The MemoryManager instance to use |
virtual void FormatterToXML::writeAttrString | ( | const XalanDOMChar * | theString, | |
size_type | theStringLength | |||
) | [protected, virtual] |
Write an attribute string.
theString | The string to write. | |
theStringLength | The length of the string. |
Reimplemented in FormatterToHTML.
virtual void FormatterToXML::writeNormalizedChars | ( | const XalanDOMChar | ch[], | |
size_type | start, | |||
size_type | length, | |||
bool | isCData | |||
) | [protected, virtual] |
Write normalized characters to the writer.
ch | the string to write. | |
start | the start offset into the string. | |
length | the length of the string. | |
isCData | true if writing CDATA. |
void FormatterToXML::writeNumberedEntityReference | ( | XalanUnicodeChar | theNumber | ) | [protected] |
Write a number into the buffer as an entity reference.
theNumber | the number to write. |
void FormatterToXML::writeParentTagEnd | ( | ) | [protected] |
Check to see if a parent's ">" has been written, and, if it has not, write it.
XalanDOMChar FormatterToXML::m_attrCharsMap[SPECIALSSIZE] [protected] |
Definition at line 599 of file FormatterToXML.hpp.
XalanDOMChar FormatterToXML::m_charsMap[SPECIALSSIZE] [protected] |
Definition at line 601 of file FormatterToXML.hpp.
int FormatterToXML::m_currentIndent [protected] |
Flag to keep track of the indent amount.
Definition at line 677 of file FormatterToXML.hpp.
const XalanDOMString FormatterToXML::m_doctypePublic [protected] |
The public ID for the doc type.
Definition at line 667 of file FormatterToXML.hpp.
const XalanDOMString FormatterToXML::m_doctypeSystem [protected] |
The System ID for the doc type.
Definition at line 662 of file FormatterToXML.hpp.
bool FormatterToXML::m_doIndent [protected] |
Flag to tell if indenting (pretty-printing) is on.
Definition at line 617 of file FormatterToXML.hpp.
XalanDOMString FormatterToXML::m_encoding [protected] |
The character encoding.
Definition at line 672 of file FormatterToXML.hpp.
bool FormatterToXML::m_encodingIsUTF [protected] |
Flag to quickly tell if the encoding is capable of full Unicode support.
Definition at line 657 of file FormatterToXML.hpp.
bool FormatterToXML::m_inCData [protected] |
Tells if we're in CData section.
Definition at line 651 of file FormatterToXML.hpp.
int FormatterToXML::m_indent [protected] |
Amount to indent.
Definition at line 682 of file FormatterToXML.hpp.
bool FormatterToXML::m_ispreserve [protected] |
State flag to tell if preservation of whitespace is important.
Definition at line 612 of file FormatterToXML.hpp.
bool FormatterToXML::m_isprevtext [protected] |
State flag that tells if the previous node processed was text, so we can tell if we should preserve whitespace.
Definition at line 635 of file FormatterToXML.hpp.
XalanDOMChar FormatterToXML::m_maxCharacter [protected] |
The maximum character size before we have to resort to escaping.
Definition at line 597 of file FormatterToXML.hpp.
bool FormatterToXML::m_needToOutputDocTypeDecl [protected] |
Flag to tell that we need to add the doctype decl, which we can't do until the first element is encountered.
Definition at line 629 of file FormatterToXML.hpp.
bool FormatterToXML::m_nextIsRaw [protected] |
Tell if the next text should be raw.
Definition at line 646 of file FormatterToXML.hpp.
BoolStackType FormatterToXML::m_preserves [protected] |
Stack to keep track of whether or not we need to preserve whitespace.
Definition at line 688 of file FormatterToXML.hpp.
bool FormatterToXML::m_shouldWriteXMLHeader [protected] |
If true, XML header should be written to output.
Definition at line 606 of file FormatterToXML.hpp.
bool FormatterToXML::m_startNewLine [protected] |
Flag to signal that a newline should be added.
Definition at line 622 of file FormatterToXML.hpp.
XalanOutputStream* const FormatterToXML::m_stream [protected] |
The stream where the XML will be written.
Definition at line 283 of file FormatterToXML.hpp.
XalanDOMString FormatterToXML::m_stringBuffer [protected] |
Definition at line 693 of file FormatterToXML.hpp.
bool FormatterToXML::m_stripCData [protected] |
If true, cdata sections are simply stripped of their CDATA brackets, without escaping.
Definition at line 641 of file FormatterToXML.hpp.
Writer* const FormatterToXML::m_writer [protected] |
The writer where the XML will be written.
Definition at line 278 of file FormatterToXML.hpp.
Doxygen and GraphViz are used to generate this API documentation from the Xalan-C header files.
Xalan-C++ XSLT Processor Version 1.11 |
|