## Xalan-C++ API Documentation

### The Xalan C++ XSLT Processor Version 1.9

Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

# FormatterToXML_UTF8 Class Reference

FormatterToXML_UTF8 formats SAX-style events into XML. More...

Inheritance diagram for FormatterToXML_UTF8:

[legend]
Collaboration diagram for FormatterToXML_UTF8:

[legend]
List of all members.

## Public Member Functions

- FormatterToXML_UTF8 (Writer &writer, const XalanDOMString &version=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()), MemoryManagerType &theManager XALAN_DEFAULT_MEMMGR)
    Constructor.
- virtual ~FormatterToXML_UTF8 ()
- virtual void startElement (const XMLCh *const name, AttributeListType &attrs)
- virtual void endElement (const XMLCh *const name)
- virtual void charactersRaw (const XMLCh *const chars, const unsigned int 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.
- virtual const XalanDOMString & getEncoding () const

## Static Public Member Functions

- void initialize (MemoryManagerType &theManager)
    Perform static initialization.
- void terminate ()
    Perform static shut down.
- FormatterToXML_UTF8 * create (MemoryManagerType &theManager, Writer &writer, const XalanDOMString &version=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()))

## Protected Member Functions

- virtual void writeXMLHeader ()
- virtual void flushBuffer ()
- virtual void writeDoctypeDecl (const XalanDOMChar *name)
- virtual void writeProcessingInstruction (const XMLCh *target, const XMLCh *data)
- virtual void writeCharacters (const XMLCh *chars, unsigned int length)
- virtual void writeCDATA (const XMLCh *chars, unsigned int length)
- virtual void outputNewline ()
    Output a line break.
- XalanDOMString::size_type writeDefaultEscape (XalanDOMChar ch, XalanDOMString::size_type i, const XalanDOMChar chars[], XalanDOMString::size_type len)
    Escape and write a character.
- XalanDOMString::size_type writeDefaultAttributeEscape (XalanDOMChar ch, XalanDOMString::size_type i, const XalanDOMChar chars[], XalanDOMString::size_type len)
    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 writeCommentData (const XalanDOMChar *data)
    Write the data for a comment.
- void writeParentTagEnd ()
    Check to see if a parent's ">" has been written, and, if it has not, write it.
- XalanDOMString::size_type writeNormalizedChar (XalanDOMChar ch, const XalanDOMChar chars[], XalanDOMString::size_type start, XalanDOMString::size_type length)
    Write a normalized character to the stream.
- void writeCDATAChars (const XalanDOMChar ch[], XalanDOMString::size_type length)
    Write characters for a CDATA section.
- void writeAttrString (const XalanDOMChar *theString, XalanDOMString::size_type theStringLength)
    Write an attribute string.

## Detailed Description

FormatterToXML_UTF8 formats SAX-style events into XML.

## Constructor & Destructor Documentation

FormatterToXML_UTF8::FormatterToXML_UTF8 | ( | Writer & | writer,
|  | const XalanDOMString & | version = 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()),
|  | MemoryManagerType &theManager | XALAN_DEFAULT_MEMMGR
| ) |

  | Constructor. Parameters:
  writer | the writer.
  version | the string to write for the XML version number.
  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 | The string the XSLT processor should output for the standalone document declaration

virtual FormatterToXML_UTF8::~FormatterToXML_UTF8 | ( |  | ) | `[virtual]`

## Member Function Documentation

virtual void FormatterToXML_UTF8::charactersRaw | ( | const XMLCh *const | chars,
|  | const unsigned int | length
| ) | `[virtual]`

| Implements FormatterToXMLBase.

virtual void FormatterToXML_UTF8::comment | ( | const XMLCh *const | data | ) | `[virtual]`

  | Called when a Comment is to be constructed. Parameters:
  data | pointer to comment data
  Exceptions:
  SAXException |
Implements FormatterToXMLBase.

FormatterToXML_UTF8* FormatterToXML_UTF8::create | ( | MemoryManagerType & | theManager,
|  | Writer & | writer,
|  | const XalanDOMString & | version = 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())
| ) | `[static]`

virtual void FormatterToXML_UTF8::endElement | ( | const XMLCh *const | name | ) | `[virtual]`

| Implements FormatterToXMLBase.

virtual void FormatterToXML_UTF8::entityReference | ( | const XMLCh *const | name | ) | `[virtual]`

  | Receive notification of a entityReference. Parameters:
  data | pointer to characters from the XML document
  Exceptions:
  SAXException |
Implements FormatterToXMLBase.

virtual void FormatterToXML_UTF8::flushBuffer | ( |  | ) | `[protected, virtual]`

| Implements FormatterToXMLBase.

virtual const XalanDOMString& FormatterToXML_UTF8::getEncoding | ( |  | ) | const`[virtual]`

| Implements FormatterToXMLBase.

void FormatterToXML_UTF8::initialize | ( | MemoryManagerType & | theManager | ) | `[static]`

| Perform static initialization. See class XMLSupportInit.

virtual void FormatterToXML_UTF8::outputNewline | ( |  | ) | `[protected, virtual]`

| Output a line break. Implements FormatterToXMLBase.

virtual void FormatterToXML_UTF8::startElement | ( | const XMLCh *const | name,
|  | AttributeListType & | attrs
| ) | `[virtual]`

| Implements FormatterToXMLBase.

void FormatterToXML_UTF8::terminate | ( |  | ) | `[static]`

| Perform static shut down. See class XMLSupportInit.

void FormatterToXML_UTF8::writeAttrString | ( | const XalanDOMChar * | theString,
|  | XalanDOMString::size_type | theStringLength
| ) | `[protected]`

  | Write an attribute string. Parameters:
  theString | The string to write.
  theStringLength | The length of the string.

virtual void FormatterToXML_UTF8::writeCDATA | ( | const XMLCh * | chars,
|  | unsigned int | length
| ) | `[protected, virtual]`

| Implements FormatterToXMLBase.

void FormatterToXML_UTF8::writeCDATAChars | ( | const XalanDOMChar | ch[],
|  | XalanDOMString::size_type | length
| ) | `[protected]`

  | Write characters for a CDATA section. Parameters:
  ch | the string to write.
  length | the length of the string.

virtual void FormatterToXML_UTF8::writeCharacters | ( | const XMLCh * | chars,
|  | unsigned int | length
| ) | `[protected, virtual]`

| Implements FormatterToXMLBase.

void FormatterToXML_UTF8::writeCommentData | ( | const XalanDOMChar * | data | ) | `[protected]`

  | Write the data for a comment. Parameters:
  data | The comment's data.

bool FormatterToXML_UTF8::writeDefaultAttributeEntity | ( | XalanDOMChar | ch | ) | `[protected]`

| Handle one of the default entities, return false if it is not a default entity.

XalanDOMString::size_type FormatterToXML_UTF8::writeDefaultAttributeEscape | ( | XalanDOMChar | ch,
|  | XalanDOMString::size_type | i,
|  | const XalanDOMChar | chars[],
|  | XalanDOMString::size_type | len
| ) | `[protected]`

| Escape and write a character in an attribute.

bool FormatterToXML_UTF8::writeDefaultEntity | ( | XalanDOMChar | ch | ) | `[protected]`

| Handle one of the default entities, return false if it is not a default entity.

XalanDOMString::size_type FormatterToXML_UTF8::writeDefaultEscape | ( | XalanDOMChar | ch,
|  | XalanDOMString::size_type | i,
|  | const XalanDOMChar | chars[],
|  | XalanDOMString::size_type | len
| ) | `[protected]`

| Escape and write a character.

virtual void FormatterToXML_UTF8::writeDoctypeDecl | ( | const XalanDOMChar * | name | ) | `[protected, virtual]`

| Implements FormatterToXMLBase.

XalanDOMString::size_type FormatterToXML_UTF8::writeNormalizedChar | ( | XalanDOMChar | ch,
|  | const XalanDOMChar | chars[],
|  | XalanDOMString::size_type | start,
|  | XalanDOMString::size_type | length
| ) | `[protected]`

  | 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.

void FormatterToXML_UTF8::writeParentTagEnd | ( |  | ) | `[protected]`

| Check to see if a parent's ">" has been written, and, if it has not, write it.

virtual void FormatterToXML_UTF8::writeProcessingInstruction | ( | const XMLCh * | target,
|  | const XMLCh * | data
| ) | `[protected, virtual]`

| Implements FormatterToXMLBase.

virtual void FormatterToXML_UTF8::writeXMLHeader | ( |  | ) | `[protected, virtual]`

| Implements FormatterToXMLBase.

The documentation for this class was generated from the following file:

- FormatterToXML_UTF8.hpp

Interpreting class diagrams

Doxygen and GraphViz are used to generate this API documentation from the Xalan-C header files.

Xalan-C++ XSLT Processor Version 1.9 Copyright © 1999-2004 The Apache Software Foundation. All Rights Reserved.