## Xalan-C++ API Documentation

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

Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members

# FormatterToXMLUnicode Class Template Reference

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

`#include <FormatterToXMLUnicode.hpp>`

Inheritance diagram for FormatterToXMLUnicode:

[legend]
Collaboration diagram for FormatterToXMLUnicode:

[legend]
List of all members.

## Public Types

- typedef UnicodeWriter::value_type value_type
- enum { eDefaultIndentAmount = 0 }

## Public Methods

- 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 unsigned int length)
- virtual void entityReference (const XMLCh *const name)
- virtual void comment (const XMLCh *const data)
- virtual const XalanDOMString& getEncoding () const

## Static Public Methods

- FormatterToXMLUnicode* create (MemoryManagerType &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)

## Protected Methods

- virtual void flushBuffer ()
- void writeXMLHeader ()
- void writeDoctypeDecl (const XalanDOMChar *name)
- void writeProcessingInstruction (const XMLCh *target, const XMLCh *data)
- void writeCharacters (const XMLCh *chars, unsigned int length)
- void writeCDATA (const XMLCh *chars, unsigned int 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...
- XalanDOMString::size_type writeNormalizedChar (XalanDOMChar ch, const XalanDOMChar chars[], XalanDOMString::size_type start, XalanDOMString::size_type length)
    Write a normalized character to the stream. More...
- void writeNumericCharacterReference (unsigned long theNumber)
- XalanDOMString::size_type writeNormalizedCharBig (const XalanDOMChar chars[], XalanDOMString::size_type start, XalanDOMString::size_type length)
- void writeCDATAChars (const XalanDOMChar chars[], XalanDOMString::size_type length, bool &outsideCDATA)
    Write characters for a CDATA section. More...
- void writeAttrString (const XalanDOMChar *theString, XalanDOMString::size_type theStringLength)
    Write an attribute string. More...

## Detailed Description

### template<class UnicodeWriter, class ConstantsType, class CharPredicate, class IndentHandler, FormatterListener::eXMLVersion XMLVersion> class FormatterToXMLUnicode

FormatterToXMLUnicode formats SAX-style events into XML.

## Member Typedef Documentation

template<class UnicodeWriter, class ConstantsType, class CharPredicate, class IndentHandler, FormatterListener::eXMLVersion XMLVersion>
typedef UnicodeWriter::value_type FormatterToXMLUnicode<UnicodeWriter, ConstantsType, CharPredicate, IndentHandler, XMLVersion>::value_type

## Member Enumeration Documentation

template<class UnicodeWriter, class ConstantsType, class CharPredicate, class IndentHandler, FormatterListener::eXMLVersion XMLVersion>
anonymous enum

  | Enumeration values:
  eDefaultIndentAmount |

## Constructor & Destructor Documentation

template<class UnicodeWriter, class ConstantsType, class CharPredicate, class IndentHandler, FormatterListener::eXMLVersion XMLVersion>
FormatterToXMLUnicode<UnicodeWriter, ConstantsType, CharPredicate, IndentHandler, XMLVersion>::FormatterToXMLUnicode<UnicodeWriter, ConstantsType, CharPredicate, IndentHandler, XMLVersion> ( | 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. 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

template<class UnicodeWriter, class ConstantsType, class CharPredicate, class IndentHandler, FormatterListener::eXMLVersion XMLVersion>
FormatterToXMLUnicode<UnicodeWriter, ConstantsType, CharPredicate, IndentHandler, XMLVersion>::~FormatterToXMLUnicode<UnicodeWriter, ConstantsType, CharPredicate, IndentHandler, XMLVersion> ( | )`[virtual]`

## Member Function Documentation

template<class UnicodeWriter, class ConstantsType, class CharPredicate, class IndentHandler, FormatterListener::eXMLVersion XMLVersion>
void FormatterToXMLUnicode<UnicodeWriter, ConstantsType, CharPredicate, IndentHandler, XMLVersion>::charactersRaw ( | const XMLCh *const chars,
| const unsigned int length )`[virtual]`

template<class UnicodeWriter, class ConstantsType, class CharPredicate, class IndentHandler, FormatterListener::eXMLVersion XMLVersion>
void FormatterToXMLUnicode<UnicodeWriter, ConstantsType, CharPredicate, IndentHandler, XMLVersion>::comment ( | const XMLCh *const data )`[virtual]`

template<class UnicodeWriter, class ConstantsType, class CharPredicate, class IndentHandler, FormatterListener::eXMLVersion XMLVersion>
FormatterToXMLUnicode<UnicodeWriter, ConstantsType, CharPredicate, IndentHandler, XMLVersion> * FormatterToXMLUnicode<UnicodeWriter, ConstantsType, CharPredicate, IndentHandler, XMLVersion>::create ( | MemoryManagerType & 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]`

template<class UnicodeWriter, class ConstantsType, class CharPredicate, class IndentHandler, FormatterListener::eXMLVersion XMLVersion>
void FormatterToXMLUnicode<UnicodeWriter, ConstantsType, CharPredicate, IndentHandler, XMLVersion>::endDocument ( | )`[virtual]`

template<class UnicodeWriter, class ConstantsType, class CharPredicate, class IndentHandler, FormatterListener::eXMLVersion XMLVersion>
void FormatterToXMLUnicode<UnicodeWriter, ConstantsType, CharPredicate, IndentHandler, XMLVersion>::endElement ( | const XMLCh *const name )`[virtual]`

template<class UnicodeWriter, class ConstantsType, class CharPredicate, class IndentHandler, FormatterListener::eXMLVersion XMLVersion>
void FormatterToXMLUnicode<UnicodeWriter, ConstantsType, CharPredicate, IndentHandler, XMLVersion>::entityReference ( | const XMLCh *const name )`[virtual]`

template<class UnicodeWriter, class ConstantsType, class CharPredicate, class IndentHandler, FormatterListener::eXMLVersion XMLVersion>
void FormatterToXMLUnicode<UnicodeWriter, ConstantsType, CharPredicate, IndentHandler, XMLVersion>::flushBuffer ( | )`[protected, virtual]`

template<class UnicodeWriter, class ConstantsType, class CharPredicate, class IndentHandler, FormatterListener::eXMLVersion XMLVersion>
const XalanDOMString & FormatterToXMLUnicode<UnicodeWriter, ConstantsType, CharPredicate, IndentHandler, XMLVersion>::getEncoding ( | ) const`[virtual]`

template<class UnicodeWriter, class ConstantsType, class CharPredicate, class IndentHandler, FormatterListener::eXMLVersion XMLVersion>
Writer * FormatterToXMLUnicode<UnicodeWriter, ConstantsType, CharPredicate, IndentHandler, XMLVersion>::getWriter ( | ) const

template<class UnicodeWriter, class ConstantsType, class CharPredicate, class IndentHandler, FormatterListener::eXMLVersion XMLVersion>
void FormatterToXMLUnicode<UnicodeWriter, ConstantsType, CharPredicate, IndentHandler, XMLVersion>::outputNewline ( | )`[protected]`

| Output a line break.

template<class UnicodeWriter, class ConstantsType, class CharPredicate, class IndentHandler, FormatterListener::eXMLVersion XMLVersion>
void FormatterToXMLUnicode<UnicodeWriter, ConstantsType, CharPredicate, IndentHandler, XMLVersion>::startElement ( | const XMLCh *const name,
| AttributeList & attrs )`[virtual]`

template<class UnicodeWriter, class ConstantsType, class CharPredicate, class IndentHandler, FormatterListener::eXMLVersion XMLVersion>
void FormatterToXMLUnicode<UnicodeWriter, ConstantsType, CharPredicate, IndentHandler, XMLVersion>::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.

template<class UnicodeWriter, class ConstantsType, class CharPredicate, class IndentHandler, FormatterListener::eXMLVersion XMLVersion>
void FormatterToXMLUnicode<UnicodeWriter, ConstantsType, CharPredicate, IndentHandler, XMLVersion>::writeCDATA ( | const XMLCh * chars,
| unsigned int length )`[protected]`

template<class UnicodeWriter, class ConstantsType, class CharPredicate, class IndentHandler, FormatterListener::eXMLVersion XMLVersion>
void FormatterToXMLUnicode<UnicodeWriter, ConstantsType, CharPredicate, IndentHandler, XMLVersion>::writeCDATAChars ( | const XalanDOMChar chars[],
| XalanDOMString::size_type length,
| bool & outsideCDATA )`[protected]`

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

template<class UnicodeWriter, class ConstantsType, class CharPredicate, class IndentHandler, FormatterListener::eXMLVersion XMLVersion>
void FormatterToXMLUnicode<UnicodeWriter, ConstantsType, CharPredicate, IndentHandler, XMLVersion>::writeCharacters ( | const XMLCh * chars,
| unsigned int length )`[protected]`

template<class UnicodeWriter, class ConstantsType, class CharPredicate, class IndentHandler, FormatterListener::eXMLVersion XMLVersion>
bool FormatterToXMLUnicode<UnicodeWriter, ConstantsType, CharPredicate, IndentHandler, XMLVersion>::writeDefaultAttributeEntity ( | XalanDOMChar ch )`[protected]`

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

template<class UnicodeWriter, class ConstantsType, class CharPredicate, class IndentHandler, FormatterListener::eXMLVersion XMLVersion>
void FormatterToXMLUnicode<UnicodeWriter, ConstantsType, CharPredicate, IndentHandler, XMLVersion>::writeDefaultAttributeEscape ( | XalanDOMChar ch )`[protected]`

| Escape and write a character in an attribute.

template<class UnicodeWriter, class ConstantsType, class CharPredicate, class IndentHandler, FormatterListener::eXMLVersion XMLVersion>
bool FormatterToXMLUnicode<UnicodeWriter, ConstantsType, CharPredicate, IndentHandler, XMLVersion>::writeDefaultEntity ( | XalanDOMChar ch )`[protected]`

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

template<class UnicodeWriter, class ConstantsType, class CharPredicate, class IndentHandler, FormatterListener::eXMLVersion XMLVersion>
void FormatterToXMLUnicode<UnicodeWriter, ConstantsType, CharPredicate, IndentHandler, XMLVersion>::writeDefaultEscape ( | XalanDOMChar ch )`[protected]`

| Escape and write a character.

template<class UnicodeWriter, class ConstantsType, class CharPredicate, class IndentHandler, FormatterListener::eXMLVersion XMLVersion>
void FormatterToXMLUnicode<UnicodeWriter, ConstantsType, CharPredicate, IndentHandler, XMLVersion>::writeDoctypeDecl ( | const XalanDOMChar * name )`[protected]`

template<class UnicodeWriter, class ConstantsType, class CharPredicate, class IndentHandler, FormatterListener::eXMLVersion XMLVersion>
XalanDOMString::size_type FormatterToXMLUnicode<UnicodeWriter, ConstantsType, CharPredicate, IndentHandler, XMLVersion>::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.

template<class UnicodeWriter, class ConstantsType, class CharPredicate, class IndentHandler, FormatterListener::eXMLVersion XMLVersion>
XalanDOMString::size_type FormatterToXMLUnicode<UnicodeWriter, ConstantsType, CharPredicate, IndentHandler, XMLVersion>::writeNormalizedCharBig ( | const XalanDOMChar chars[],
| XalanDOMString::size_type start,
| XalanDOMString::size_type length )`[protected]`

template<class UnicodeWriter, class ConstantsType, class CharPredicate, class IndentHandler, FormatterListener::eXMLVersion XMLVersion>
void FormatterToXMLUnicode<UnicodeWriter, ConstantsType, CharPredicate, IndentHandler, XMLVersion>::writeNumericCharacterReference ( | unsigned long theNumber )`[protected]`

template<class UnicodeWriter, class ConstantsType, class CharPredicate, class IndentHandler, FormatterListener::eXMLVersion XMLVersion>
void FormatterToXMLUnicode<UnicodeWriter, ConstantsType, CharPredicate, IndentHandler, XMLVersion>::writeParentTagEnd ( | )`[protected]`

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

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 )`[protected]`

template<class UnicodeWriter, class ConstantsType, class CharPredicate, class IndentHandler, FormatterListener::eXMLVersion XMLVersion>
void FormatterToXMLUnicode<UnicodeWriter, ConstantsType, CharPredicate, IndentHandler, XMLVersion>::writeXMLHeader ( | )`[protected]`

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

- FormatterToXMLUnicode.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.10 Copyright © 1999-2004 The Apache Software Foundation. All Rights Reserved.