|
Xalan-C++ API Reference 1.12.0
|
FormatterToXMLUnicode formats SAX-style events into XML. More...
#include <xalanc/XMLSupport/FormatterToXMLUnicode.hpp>
Public Types | |
| enum | { eDefaultIndentAmount = 0 } |
| typedef UnicodeWriter::value_type | value_type |
| Public Types inherited from xalanc::XalanXMLSerializerBase | |
| 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 | |
| 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. | |
| 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) |
| virtual void | entityReference (const XMLCh *const name) |
| Receive notification of a entityReference. | |
| virtual void | comment (const XMLCh *const data) |
| Called when a Comment is to be constructed. | |
| Public Member Functions inherited from xalanc::XalanXMLSerializerBase | |
| XalanXMLSerializerBase (MemoryManager &theManager, eXMLVersion theXMLVersion, const XalanDOMString &theEncoding, const XalanDOMString &theDoctypeSystem, const XalanDOMString &theDoctypePublic, bool xmlDecl, const XalanDOMString &theStandalone) | |
| Constructor. | |
| 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) |
| 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. | |
| eXMLVersion | getXMLVersion () const |
| Get the version of XML the FormatterListener is generating. | |
| bool | isXML1_1Version () const |
| Determine if the version of XML output is 1.1. | |
| const PrefixResolver * | getPrefixResolver () const |
| Get the PrefixResolver for the FormatterListener. | |
| void | setPrefixResolver (const PrefixResolver *thePrefixResolver) |
| Set the PrefixResolver for the FormatterListener. | |
| virtual void | charactersRaw (const XMLCh *const chars, const size_type length)=0 |
| Receive notification of character data. | |
| virtual void | cdata (const XMLCh *const ch, const size_type length)=0 |
| Receive notification of cdata. | |
| virtual void | characters (const XMLCh *const chars, const size_type length)=0 |
| virtual void | ignorableWhitespace (const XMLCh *const chars, const size_type length)=0 |
| virtual const XalanDOMString & | getMediaType () const |
| virtual int | getIndent () const |
Static Public Member Functions | |
| static FormatterToXMLUnicode * | 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) |
| Static Public Member Functions inherited from xalanc::XalanXMLSerializerBase | |
| static void | initialize (MemoryManager &theManager) |
| Perform static initialization. | |
| static void | terminate () |
| Perform static shut down. | |
Protected Member Functions | |
| 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. | |
| void | writeDefaultEscape (XalanDOMChar ch) |
| Escape and write a character. | |
| void | writeDefaultAttributeEscape (XalanDOMChar ch) |
| Escape and write a character in an attribute. | |
| bool | writeDefaultEntity (XalanDOMChar ch) |
| Handle one of the default entities, return false if it is not a default entity. | |
| bool | writeDefaultAttributeEntity (XalanDOMChar ch) |
| Handle one of the default entities, return false if it is not a default entity. | |
| void | writeParentTagEnd () |
| Check to see if a parent's ">" has been written, and, if it has not, write it. | |
| size_type | writeNormalizedChar (XalanDOMChar ch, const XalanDOMChar chars[], size_type start, size_type length) |
| Write a normalized character to the stream. | |
| void | writeNumericCharacterReference (XMLUInt32 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. | |
| void | writeAttrString (const XalanDOMChar *theString, size_type theStringLength) |
| Write an attribute string. | |
| Protected Member Functions inherited from xalanc::XalanXMLSerializerBase | |
| bool | markParentForChildren () |
| Mark the parent element as having a child. | |
| bool | getNeedToOutputDoctypeDecl () const |
| Determine if it a DOCTYPE declaration needs to be written. | |
| void | openElementForChildren () |
| Open an element for possibile children. | |
| bool | outsideDocumentElement () const |
| bool | childNodesWereAdded () |
| Determine if an element ever had any children added. | |
| void | generateDoctypeDecl (const XalanDOMChar *name) |
| Protected Member Functions inherited from xalanc::FormatterListener | |
| void | setXMLVersion (eXMLVersion theVersion) |
| Set the output version during serializing. | |
Additional Inherited Members | |
| Static Public Attributes inherited from xalanc::XalanXMLSerializerBase | |
| 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 |
| Static Protected Member Functions inherited from xalanc::XalanXMLSerializerBase | |
| 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. | |
| static void | throwInvalidUTF16SurrogateException (XalanDOMChar ch, XalanDOMChar next, MemoryManager &theManager) |
| Throw an exception when an invalid surrogate is encountered. | |
| static void | throwInvalidCharacterException (XalanUnicodeChar ch, MemoryManager &theManager) |
| Throw an exception when an invalid character is encountered. | |
| static void | throwInvalidXMLCharacterException (XalanUnicodeChar ch, const XalanDOMString &theXMLversion, MemoryManager &theManager) |
| Throw an exception when an invalid character for the specific XML version is encountered. | |
| Protected Attributes inherited from xalanc::XalanXMLSerializerBase | |
| bool | m_nextIsRaw |
| Tell if the next text should be raw. | |
| bool | m_spaceBeforeClose |
| Add space before '/>' for XHTML. | |
| const XalanDOMString | m_doctypeSystem |
| The System ID for the doc type. | |
| const XalanDOMString | m_doctypePublic |
| The public ID for the doc type. | |
| const XalanDOMString & | m_version |
| Tells the XML version, for writing out to the XML decl. | |
| const XalanDOMString | m_standalone |
| Text for standalone part of header. | |
| const XalanDOMString | m_encoding |
| Protected Attributes inherited from xalanc::FormatterListener | |
| const PrefixResolver * | m_prefixResolver |
| Static Protected Attributes inherited from xalanc::FormatterListener | |
| static const XalanDOMString | s_emptyString |
FormatterToXMLUnicode formats SAX-style events into XML.
Definition at line 57 of file FormatterToXMLUnicode.hpp.
| typedef UnicodeWriter::value_type xalanc::FormatterToXMLUnicode< UnicodeWriter, ConstantsType, CharPredicate, IndentHandler, XMLVersion >::value_type |
Definition at line 61 of file FormatterToXMLUnicode.hpp.
| anonymous enum |
| Enumerator | |
|---|---|
| eDefaultIndentAmount | |
Definition at line 63 of file FormatterToXMLUnicode.hpp.
|
inline |
| 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.
References eDefaultIndentAmount, xalanc::FormatterListener::s_emptyString, and xalanc::XalanXMLSerializerBase::XalanXMLSerializerBase().
Referenced by create().
|
inlinevirtual |
Definition at line 142 of file FormatterToXMLUnicode.hpp.
|
inlinevirtual |
Implements xalanc::XalanXMLSerializerBase.
Definition at line 237 of file FormatterToXMLUnicode.hpp.
References xalanc::length(), and writeParentTagEnd().
|
inlinevirtual |
Called when a Comment is to be constructed.
| data | pointer to comment data |
| SAXException |
Implements xalanc::XalanXMLSerializerBase.
Definition at line 264 of file FormatterToXMLUnicode.hpp.
References xalanc::XalanDOMString::length(), and writeParentTagEnd().
|
inlinestatic |
Definition at line 110 of file FormatterToXMLUnicode.hpp.
References eDefaultIndentAmount, FormatterToXMLUnicode(), xalanc::XalanAllocationGuard::get(), xalanc::XalanAllocationGuard::release(), and xalanc::FormatterListener::s_emptyString.
|
inlinevirtual |
Implements xalanc::FormatterListener.
Definition at line 155 of file FormatterToXMLUnicode.hpp.
References flushBuffer(), and flushWriter().
|
inlinevirtual |
Implements xalanc::XalanXMLSerializerBase.
Definition at line 201 of file FormatterToXMLUnicode.hpp.
References xalanc::XalanXMLSerializerBase::childNodesWereAdded(), and xalanc::XalanXMLSerializerBase::m_spaceBeforeClose.
|
inlinevirtual |
Receive notification of a entityReference.
| data | pointer to characters from the XML document |
| SAXException |
Implements xalanc::XalanXMLSerializerBase.
Definition at line 250 of file FormatterToXMLUnicode.hpp.
References writeParentTagEnd().
|
inlineprotectedvirtual |
Implements xalanc::XalanXMLSerializerBase.
Definition at line 287 of file FormatterToXMLUnicode.hpp.
Referenced by endDocument().
|
inlineprotectedvirtual |
Definition at line 293 of file FormatterToXMLUnicode.hpp.
Referenced by endDocument().
|
inlinevirtual |
Reimplemented from xalanc::FormatterListener.
Definition at line 147 of file FormatterToXMLUnicode.hpp.
|
inlineprotectedvirtual |
Output a line break.
Implements xalanc::XalanXMLSerializerBase.
Definition at line 495 of file FormatterToXMLUnicode.hpp.
Referenced by writeCDATAChars(), writeDefaultEscape(), writeDoctypeDecl(), and writeNormalizedChar().
|
inlinevirtual |
Implements xalanc::XalanXMLSerializerBase.
Definition at line 167 of file FormatterToXMLUnicode.hpp.
References xalanc::XalanXMLSerializerBase::generateDoctypeDecl(), xalanc::XalanXMLSerializerBase::openElementForChildren(), and writeParentTagEnd().
|
inlineprotected |
Write an attribute string.
| theString | The string to write. |
| theStringLength | The length of the string. |
Definition at line 793 of file FormatterToXMLUnicode.hpp.
References writeDefaultAttributeEscape(), and writeNormalizedCharBig().
|
inlineprotectedvirtual |
Implements xalanc::XalanXMLSerializerBase.
Definition at line 463 of file FormatterToXMLUnicode.hpp.
References xalanc::length(), writeCDATAChars(), and writeParentTagEnd().
|
inlineprotected |
Write characters for a CDATA section.
| ch | the string to write. |
| length | the length of the string. |
Definition at line 710 of file FormatterToXMLUnicode.hpp.
References xalanc::XalanXMLSerializerBase::getMemoryManager(), xalanc::length(), xalanc::XalanXMLSerializerBase::m_version, outputNewline(), and xalanc::XalanXMLSerializerBase::throwInvalidXMLCharacterException().
Referenced by writeCDATA().
|
inlineprotectedvirtual |
Implements xalanc::XalanXMLSerializerBase.
Definition at line 413 of file FormatterToXMLUnicode.hpp.
References xalanc::length(), writeDefaultEscape(), writeNormalizedCharBig(), and writeParentTagEnd().
|
inlineprotected |
Handle one of the default entities, return false if it is not a default entity.
Definition at line 594 of file FormatterToXMLUnicode.hpp.
References writeDefaultEntity().
Referenced by writeDefaultAttributeEscape().
|
inlineprotected |
Escape and write a character in an attribute.
Definition at line 535 of file FormatterToXMLUnicode.hpp.
References xalanc::XalanXMLSerializerBase::getMemoryManager(), xalanc::XalanXMLSerializerBase::m_version, xalanc::XalanXMLSerializerBase::throwInvalidXMLCharacterException(), writeDefaultAttributeEntity(), and writeNumericCharacterReference().
Referenced by writeAttrString().
|
inlineprotected |
Handle one of the default entities, return false if it is not a default entity.
Definition at line 561 of file FormatterToXMLUnicode.hpp.
Referenced by writeDefaultAttributeEntity(), and writeDefaultEscape().
|
inlineprotected |
Escape and write a character.
Definition at line 504 of file FormatterToXMLUnicode.hpp.
References xalanc::XalanXMLSerializerBase::getMemoryManager(), xalanc::XalanXMLSerializerBase::m_version, outputNewline(), xalanc::XalanXMLSerializerBase::throwInvalidXMLCharacterException(), writeDefaultEntity(), and writeNumericCharacterReference().
Referenced by writeCharacters().
|
inlineprotectedvirtual |
Implements xalanc::XalanXMLSerializerBase.
Definition at line 345 of file FormatterToXMLUnicode.hpp.
References xalanc::XalanXMLSerializerBase::m_doctypePublic, xalanc::XalanXMLSerializerBase::m_doctypeSystem, and outputNewline().
|
inlineprotected |
Write a normalized character to the stream.
| 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.
References xalanc::XalanXMLSerializerBase::getMemoryManager(), xalanc::length(), xalanc::XalanXMLSerializerBase::m_version, outputNewline(), and xalanc::XalanXMLSerializerBase::throwInvalidXMLCharacterException().
|
inlineprotected |
Definition at line 679 of file FormatterToXMLUnicode.hpp.
References xalanc::length(), writeNumericCharacterReference(), and xalanc::FormatterListener::XML_VERSION_1_1.
Referenced by writeAttrString(), and writeCharacters().
|
inlineprotected |
Definition at line 667 of file FormatterToXMLUnicode.hpp.
References xalanc::NumberToDOMString().
Referenced by writeDefaultAttributeEscape(), writeDefaultEscape(), and writeNormalizedCharBig().
|
inlineprotected |
Check to see if a parent's ">" has been written, and, if it has not, write it.
Definition at line 619 of file FormatterToXMLUnicode.hpp.
References xalanc::XalanXMLSerializerBase::markParentForChildren().
Referenced by charactersRaw(), comment(), entityReference(), startElement(), writeCDATA(), writeCharacters(), and writeProcessingInstruction().
|
inlineprotectedvirtual |
Implements xalanc::XalanXMLSerializerBase.
Definition at line 385 of file FormatterToXMLUnicode.hpp.
References xalanc::isXMLWhitespace(), xalanc::length(), and writeParentTagEnd().
|
inlineprotectedvirtual |
Implements xalanc::XalanXMLSerializerBase.
Definition at line 299 of file FormatterToXMLUnicode.hpp.
References xalanc::XalanXMLSerializerBase::getNeedToOutputDoctypeDecl(), xalanc::XalanXMLSerializerBase::m_encoding, xalanc::XalanXMLSerializerBase::m_standalone, and xalanc::XalanXMLSerializerBase::m_version.
Copyright © 1999-2020 The Apache Software Foundation. All Rights Reserved.
Generated on for Xalan-C++ API Reference by
1.15.0