Unicorn XML Toolkit
Version 1.00.00

Namespace FoHtml
Class IOutputHandler

class IOutputHandler {
public:
    IOutputHandler();
    virtual ~IOutputHandler();
public:
    virtual void StartDocument() = 0;
    virtual void EndDocument() = 0;
    virtual void StartElement(
        const CString &strName,
        const CString &strNamespaceUri) = 0;
    virtual void EndElement() = 0;
    virtual void StartAttribute(
        const CString &strName,
        const CString &strNamespaceUri) = 0;
    virtual void EndAttribute() = 0;
    virtual void CharacterData(
        const WCHAR *pData, int nSize, int nOptions=0) = 0;
    };

The interface for receiving notifications of the logical content of HTML documents generated by the HTML-based UFO front-end.

An application must implement this interface and register an instance with the HTML front-end using the IFormatter::SetOutputHandler function.

Since:
1.00.00
Version:
1.00.00
Author:
Alexey Gokhberg
Constructor/Destructor Summary
IOutputHandler ();
����������Constructs the output handler.
~IOutputHandler ();
����������Destroys the output handler.

Function Summary
void StartDocument ();
����������Receives notification of the beginning of a document.
void EndDocument ();
����������Receives notification of the end of a document.
void StartElement (const CString &strName, const CString &strNamespaceUri);
����������Receives notification of the beginning of an element.
void EndElement ();
����������Receives notification of the end of an element.
void StartAttribute (const CString &strName, const CString &strNamespaceUri);
����������Receives notification of the beginning of an attribute.
void EndAttribute ();
����������Receives notification of the end of an attribute.
void CharacterData (const WCHAR *pData, int nSize, int nOptions=0);
����������Receives notification of character data.

Constructor/Destructor Detail

IOutputHandler

IOutputHandler();

Constructs the output handler.

~IOutputHandler

virtual ~IOutputHandler();

Destroys the output handler.

Function Detail

StartDocument

virtual void StartDocument() = 0;

Receives notification of the beginning of a document.

This function is invoked only once per document, before any other event processing functions in this class.

EndDocument

virtual void EndDocument() = 0;

Receives notification of the end of a document.

This function is invoked only once per document, after any other event processing functions in this class.

StartElement

virtual void StartElement(
    const CString &strName,
    const CString &strNamespaceUri) = 0;

Receives notification of the beginning of an element.

This function is invoked at the beginning of every element in the result document; there will be a corresponding EndElement event for every StartElement event (even when the element is empty). All of the element's attributes, followed by all of the element's content will be reported, in order, before the coresponding EndElement event.

The strNamespaceUri parameter is reserved for the future; in the current release of the front-end it is always assigned an empty string.

Parameters:
strName - the qualified (prefixed) name
strNamespaceUri - the namespace URI; the empty string if the element has no namespace URI

EndElement

virtual void EndElement() = 0;

Receives notification of the end of an element.

This function is invoked at the end of every element in the result document; there will be a corresponding StartElement event for every EndElement event (even when the element is empty).

StartAttribute

virtual void StartAttribute(
    const CString &strName,
    const CString &strNamespaceUri) = 0;

Receives notification of the beginning of an attribute.

This function is invoked at the beginning of every attribute declaration in the result document; there will be a corresponding EndAttribute event for every StartAttribute event. The attribute value will be reported as one or more CharacterData events, before the coresponding EndAttribute event.

The strNamespaceUri parameter is reserved for the future; in the current release of the front-end it is always assigned an empty string.

Parameters:
strName - the qualified (prefixed) name
strNamespaceUri - the namespace URI; the empty string if the element has no namespace URI

EndAttribute

virtual void EndAttribute() = 0;

Receives notification of the end of an attribute.

This function is invoked at the end of every attribute declaration in the result document; there will be a corresponding StartAttribute event for every EndAttribute event.

CharacterData

virtual void CharacterData(
    const WCHAR *pData, int nSize, int nOptions=0) = 0;

Receives notification of character data.

This function is invoked to report each chunk of character data, each chunk of the content of the any comment, and each chunk of any attribute value.

Applications may supply all contiguous character data in a single chunk, or they may split it into several chunks.

Parameters:
pData - the array of characters
nSize - the number of characters to read from the array
nOptions - reserved for the future use; always set to 0 in the current implementation

Unicorn XML Toolkit
Version 1.00.00


This document was created using Unicorn DOC++.

Copyright 1999-2001 Unicorn Enterprises SA.
All Rights Reserved.