FormatterToXMLUnicode formats SAX-style events into XML.
More...
#include <FormatterToXMLUnicode.hpp>
Inherits XalanXMLSerializerBase.
|
| enum | { eDefaultIndentAmount = 0
} |
| |
| typedef UnicodeWriter::value_type | value_type |
| |
| 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 |
| |
|
| | FormatterToXMLUnicode (MemoryManager &theManager, Writer &writer, const XalanDOMString &encoding, const XalanDOMString &doctypeSystem=s_emptyString, const XalanDOMString &doctypePublic=s_emptyString, bool xmlDecl=true, const XalanDOMString &standalone=s_emptyString, size_type indent=eDefaultIndentAmount) |
| | Constructor. More...
|
| |
| virtual | ~FormatterToXMLUnicode () |
| |
| Writer * | getWriter () const |
| |
| virtual void | endDocument () |
| |
| virtual void | startElement (const XMLCh *const name, AttributeList &attrs) |
| |
| virtual void | endElement (const XMLCh *const name) |
| |
| virtual void | charactersRaw (const XMLCh *const chars, const size_type length) |
| | Receive notification of character data. More...
|
| |
| virtual void | entityReference (const XMLCh *const name) |
| | Receive notification of a entityReference. More...
|
| |
| virtual void | comment (const XMLCh *const data) |
| | Called when a Comment is to be constructed. More...
|
| |
| | 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 | characters (const XMLCh *const chars, const size_type length) |
| |
| 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 | 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 const XalanDOMString & | getMediaType () const |
| |
| virtual int | getIndent () const |
| |
|
| virtual void | flushBuffer () |
| |
| virtual void | flushWriter () |
| |
| virtual void | writeXMLHeader () |
| |
| void | writeDoctypeDecl (const XalanDOMChar *name) |
| |
| void | writeProcessingInstruction (const XMLCh *target, const XMLCh *data) |
| |
| void | writeCharacters (const XMLCh *chars, size_type length) |
| |
| void | writeCDATA (const XMLCh *chars, size_type length) |
| |
| void | outputNewline () |
| | Output a line break. More...
|
| |
| void | writeDefaultEscape (XalanDOMChar ch) |
| | Escape and write a character. More...
|
| |
| void | writeDefaultAttributeEscape (XalanDOMChar ch) |
| | Escape and write a character in an attribute. More...
|
| |
| bool | writeDefaultEntity (XalanDOMChar ch) |
| | Handle one of the default entities, return false if it is not a default entity. More...
|
| |
| bool | writeDefaultAttributeEntity (XalanDOMChar ch) |
| | Handle one of the default entities, return false if it is not a default entity. More...
|
| |
| void | writeParentTagEnd () |
| | Check to see if a parent's ">" has been written, and, if it has not, write it. More...
|
| |
| size_type | writeNormalizedChar (XalanDOMChar ch, const XalanDOMChar chars[], size_type start, size_type length) |
| | Write a normalized character to the stream. More...
|
| |
| void | writeNumericCharacterReference (unsigned long theNumber) |
| |
| size_type | writeNormalizedCharBig (const XalanDOMChar chars[], size_type start, size_type length) |
| |
| void | writeCDATAChars (const XalanDOMChar chars[], size_type length, bool &outsideCDATA) |
| | Write characters for a CDATA section. More...
|
| |
| void | writeAttrString (const XalanDOMChar *theString, size_type theStringLength) |
| | Write an attribute string. More...
|
| |
| 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) |
| |
| void | setXMLVersion (eXMLVersion theVersion) |
| | Set the output version during serializing. More...
|
| |
template<class UnicodeWriter, class ConstantsType, class CharPredicate, class IndentHandler, FormatterListener::eXMLVersion XMLVersion>
class FormatterToXMLUnicode< UnicodeWriter, ConstantsType, CharPredicate, IndentHandler, XMLVersion >
FormatterToXMLUnicode formats SAX-style events into XML.
Definition at line 57 of file FormatterToXMLUnicode.hpp.
template<class UnicodeWriter , class ConstantsType , class CharPredicate , class IndentHandler , FormatterListener::eXMLVersion XMLVersion>
template<class UnicodeWriter , class ConstantsType , class CharPredicate , class IndentHandler , FormatterListener::eXMLVersion XMLVersion>
template<class UnicodeWriter , class ConstantsType , class CharPredicate , class IndentHandler , FormatterListener::eXMLVersion XMLVersion>
| FormatterToXMLUnicode< UnicodeWriter, ConstantsType, CharPredicate, IndentHandler, XMLVersion >::FormatterToXMLUnicode |
( |
MemoryManager & |
theManager, |
|
|
Writer & |
writer, |
|
|
const XalanDOMString & |
encoding, |
|
|
const XalanDOMString & |
doctypeSystem = s_emptyString, |
|
|
const XalanDOMString & |
doctypePublic = s_emptyString, |
|
|
bool |
xmlDecl = true, |
|
|
const XalanDOMString & |
standalone = s_emptyString, |
|
|
size_type |
indent = eDefaultIndentAmount |
|
) |
| |
|
inline |
Constructor.
- Parameters
-
| theManager | The MemoryManager instance to use for all memory allocations |
| writer | the writer. |
| version | the string to write for the XML version number. |
| 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 | The string the XSLT processor should output for the standalone document declaration |
Definition at line 84 of file FormatterToXMLUnicode.hpp.
template<class UnicodeWriter , class ConstantsType , class CharPredicate , class IndentHandler , FormatterListener::eXMLVersion XMLVersion>
template<class UnicodeWriter , class ConstantsType , class CharPredicate , class IndentHandler , FormatterListener::eXMLVersion XMLVersion>
| virtual void FormatterToXMLUnicode< UnicodeWriter, ConstantsType, CharPredicate, IndentHandler, XMLVersion >::charactersRaw |
( |
const XMLCh *const |
chars, |
|
|
const size_type |
length |
|
) |
| |
|
inlinevirtual |
Receive notification of character data.
If available, when the disable-output-escaping attribute is used, output raw text without escaping.
- Parameters
-
| chars | pointer to characters from the XML document |
| length | number of characters to read from the array |
- Exceptions
-
Implements XalanXMLSerializerBase.
Definition at line 237 of file FormatterToXMLUnicode.hpp.
template<class UnicodeWriter , class ConstantsType , class CharPredicate , class IndentHandler , FormatterListener::eXMLVersion XMLVersion>
| virtual void FormatterToXMLUnicode< UnicodeWriter, ConstantsType, CharPredicate, IndentHandler, XMLVersion >::comment |
( |
const XMLCh *const |
data) | |
|
|
inlinevirtual |
template<class UnicodeWriter , class ConstantsType , class CharPredicate , class IndentHandler , FormatterListener::eXMLVersion XMLVersion>
| static FormatterToXMLUnicode* FormatterToXMLUnicode< UnicodeWriter, ConstantsType, CharPredicate, IndentHandler, XMLVersion >::create |
( |
MemoryManager & |
theManager, |
|
|
Writer & |
writer, |
|
|
const XalanDOMString & |
encoding, |
|
|
const XalanDOMString & |
doctypeSystem = s_emptyString, |
|
|
const XalanDOMString & |
doctypePublic = s_emptyString, |
|
|
bool |
xmlDecl = true, |
|
|
const XalanDOMString & |
standalone = s_emptyString, |
|
|
size_type |
indent = eDefaultIndentAmount |
|
) |
| |
|
inlinestatic |
template<class UnicodeWriter , class ConstantsType , class CharPredicate , class IndentHandler , FormatterListener::eXMLVersion XMLVersion>
| virtual void FormatterToXMLUnicode< UnicodeWriter, ConstantsType, CharPredicate, IndentHandler, XMLVersion >::endDocument |
( |
) | |
|
|
inlinevirtual |
template<class UnicodeWriter , class ConstantsType , class CharPredicate , class IndentHandler , FormatterListener::eXMLVersion XMLVersion>
| virtual void FormatterToXMLUnicode< UnicodeWriter, ConstantsType, CharPredicate, IndentHandler, XMLVersion >::endElement |
( |
const XMLCh *const |
name) | |
|
|
inlinevirtual |
template<class UnicodeWriter , class ConstantsType , class CharPredicate , class IndentHandler , FormatterListener::eXMLVersion XMLVersion>
| virtual void FormatterToXMLUnicode< UnicodeWriter, ConstantsType, CharPredicate, IndentHandler, XMLVersion >::entityReference |
( |
const XMLCh *const |
name) | |
|
|
inlinevirtual |
template<class UnicodeWriter , class ConstantsType , class CharPredicate , class IndentHandler , FormatterListener::eXMLVersion XMLVersion>
| virtual void FormatterToXMLUnicode< UnicodeWriter, ConstantsType, CharPredicate, IndentHandler, XMLVersion >::flushBuffer |
( |
) | |
|
|
inlineprotectedvirtual |
template<class UnicodeWriter , class ConstantsType , class CharPredicate , class IndentHandler , FormatterListener::eXMLVersion XMLVersion>
| virtual void FormatterToXMLUnicode< UnicodeWriter, ConstantsType, CharPredicate, IndentHandler, XMLVersion >::flushWriter |
( |
) | |
|
|
inlineprotectedvirtual |
template<class UnicodeWriter , class ConstantsType , class CharPredicate , class IndentHandler , FormatterListener::eXMLVersion XMLVersion>
template<class UnicodeWriter , class ConstantsType , class CharPredicate , class IndentHandler , FormatterListener::eXMLVersion XMLVersion>
| void FormatterToXMLUnicode< UnicodeWriter, ConstantsType, CharPredicate, IndentHandler, XMLVersion >::outputNewline |
( |
) | |
|
|
inlineprotectedvirtual |
template<class UnicodeWriter , class ConstantsType , class CharPredicate , class IndentHandler , FormatterListener::eXMLVersion XMLVersion>
| virtual void FormatterToXMLUnicode< UnicodeWriter, ConstantsType, CharPredicate, IndentHandler, XMLVersion >::startElement |
( |
const XMLCh *const |
name, |
|
|
AttributeList & |
attrs |
|
) |
| |
|
inlinevirtual |
template<class UnicodeWriter , class ConstantsType , class CharPredicate , class IndentHandler , FormatterListener::eXMLVersion XMLVersion>
| void FormatterToXMLUnicode< UnicodeWriter, ConstantsType, CharPredicate, IndentHandler, XMLVersion >::writeAttrString |
( |
const XalanDOMChar * |
theString, |
|
|
size_type |
theStringLength |
|
) |
| |
|
inlineprotected |
Write an attribute string.
- Parameters
-
| theString | The string to write. |
| theStringLength | The length of the string. |
Definition at line 793 of file FormatterToXMLUnicode.hpp.
template<class UnicodeWriter , class ConstantsType , class CharPredicate , class IndentHandler , FormatterListener::eXMLVersion XMLVersion>
| void FormatterToXMLUnicode< UnicodeWriter, ConstantsType, CharPredicate, IndentHandler, XMLVersion >::writeCDATA |
( |
const XMLCh * |
chars, |
|
|
size_type |
length |
|
) |
| |
|
inlineprotectedvirtual |
template<class UnicodeWriter , class ConstantsType , class CharPredicate , class IndentHandler , FormatterListener::eXMLVersion XMLVersion>
| void FormatterToXMLUnicode< UnicodeWriter, ConstantsType, CharPredicate, IndentHandler, XMLVersion >::writeCDATAChars |
( |
const XalanDOMChar |
chars[], |
|
|
size_type |
length, |
|
|
bool & |
outsideCDATA |
|
) |
| |
|
inlineprotected |
Write characters for a CDATA section.
- Parameters
-
| ch | the string to write. |
| length | the length of the string. |
Definition at line 710 of file FormatterToXMLUnicode.hpp.
template<class UnicodeWriter , class ConstantsType , class CharPredicate , class IndentHandler , FormatterListener::eXMLVersion XMLVersion>
| void FormatterToXMLUnicode< UnicodeWriter, ConstantsType, CharPredicate, IndentHandler, XMLVersion >::writeCharacters |
( |
const XMLCh * |
chars, |
|
|
size_type |
length |
|
) |
| |
|
inlineprotectedvirtual |
template<class UnicodeWriter , class ConstantsType , class CharPredicate , class IndentHandler , FormatterListener::eXMLVersion XMLVersion>
| bool FormatterToXMLUnicode< UnicodeWriter, ConstantsType, CharPredicate, IndentHandler, XMLVersion >::writeDefaultAttributeEntity |
( |
XalanDOMChar |
ch) | |
|
|
inlineprotected |
template<class UnicodeWriter , class ConstantsType , class CharPredicate , class IndentHandler , FormatterListener::eXMLVersion XMLVersion>
| void FormatterToXMLUnicode< UnicodeWriter, ConstantsType, CharPredicate, IndentHandler, XMLVersion >::writeDefaultAttributeEscape |
( |
XalanDOMChar |
ch) | |
|
|
inlineprotected |
template<class UnicodeWriter , class ConstantsType , class CharPredicate , class IndentHandler , FormatterListener::eXMLVersion XMLVersion>
| bool FormatterToXMLUnicode< UnicodeWriter, ConstantsType, CharPredicate, IndentHandler, XMLVersion >::writeDefaultEntity |
( |
XalanDOMChar |
ch) | |
|
|
inlineprotected |
template<class UnicodeWriter , class ConstantsType , class CharPredicate , class IndentHandler , FormatterListener::eXMLVersion XMLVersion>
| void FormatterToXMLUnicode< UnicodeWriter, ConstantsType, CharPredicate, IndentHandler, XMLVersion >::writeDefaultEscape |
( |
XalanDOMChar |
ch) | |
|
|
inlineprotected |
template<class UnicodeWriter , class ConstantsType , class CharPredicate , class IndentHandler , FormatterListener::eXMLVersion XMLVersion>
| void FormatterToXMLUnicode< UnicodeWriter, ConstantsType, CharPredicate, IndentHandler, XMLVersion >::writeDoctypeDecl |
( |
const XalanDOMChar * |
name) | |
|
|
inlineprotectedvirtual |
template<class UnicodeWriter , class ConstantsType , class CharPredicate , class IndentHandler , FormatterListener::eXMLVersion XMLVersion>
Write a normalized character to the stream.
- Parameters
-
| ch | the string to write. |
| start | the start offset into the string. |
| length | the length of the string. |
Definition at line 638 of file FormatterToXMLUnicode.hpp.
template<class UnicodeWriter , class ConstantsType , class CharPredicate , class IndentHandler , FormatterListener::eXMLVersion XMLVersion>
template<class UnicodeWriter , class ConstantsType , class CharPredicate , class IndentHandler , FormatterListener::eXMLVersion XMLVersion>
| void FormatterToXMLUnicode< UnicodeWriter, ConstantsType, CharPredicate, IndentHandler, XMLVersion >::writeNumericCharacterReference |
( |
unsigned long |
theNumber) | |
|
|
inlineprotected |
template<class UnicodeWriter , class ConstantsType , class CharPredicate , class IndentHandler , FormatterListener::eXMLVersion XMLVersion>
| void FormatterToXMLUnicode< UnicodeWriter, ConstantsType, CharPredicate, IndentHandler, XMLVersion >::writeParentTagEnd |
( |
) | |
|
|
inlineprotected |
template<class UnicodeWriter , class ConstantsType , class CharPredicate , class IndentHandler , FormatterListener::eXMLVersion XMLVersion>
| void FormatterToXMLUnicode< UnicodeWriter, ConstantsType, CharPredicate, IndentHandler, XMLVersion >::writeProcessingInstruction |
( |
const XMLCh * |
target, |
|
|
const XMLCh * |
data |
|
) |
| |
|
inlineprotectedvirtual |
template<class UnicodeWriter , class ConstantsType , class CharPredicate , class IndentHandler , FormatterListener::eXMLVersion XMLVersion>
| virtual void FormatterToXMLUnicode< UnicodeWriter, ConstantsType, CharPredicate, IndentHandler, XMLVersion >::writeXMLHeader |
( |
) | |
|
|
inlineprotectedvirtual |
The documentation for this class was generated from the following file: