|
Unicorn XML Toolkit Version 1.00.00 |
|||||||||
� PREV CLASS ��NEXT CLASS | FRAMES��NO FRAMES | |||||||||
SUMMARY: � CONSTR �|� FUNCTION �|�DATA | DETAIL: � CONSTR �|� FUNCTION �|�DATA |
class CBasicOutputHandler: public COutputHandler { public: CBasicOutputHandler(); ~CBasicOutputHandler(); public: void SetOptions(const XOutputOptions &pOutputOptions); void StartDocument(); void EndDocument(); void StartElement( const CString &strName, const CString &strNamespaceUri); void EndElement(); void StartAttribute( const CString &strName, const CString &strNamespaceUri); void EndAttribute(); void StartNamespace(const CString &strName); void EndNamespace(); void CharacterData( const WCHAR *pData, int nSize, int nOptions=0); void StartComment(); void EndComment(); void StartCdataSection(); void EndCdataSection(); void EntityReference(const CString &strName); void ProcessingInstruction( const CString &strTarget, const CString &strData); public: void SetEncodingHandler( const XEncodingHandler &pEncodingHandler); void SetStream(IStream *pStream); void SetXmlOutputHandler(const XOutputHandler &pOutputHandler); void SetHtmlOutputHandler(const XOutputHandler &pOutputHandler); void SetTextOutputHandler(const XOutputHandler &pOutputHandler); void AddExtensionOutputHandler( const CString &strNamespaceUri, const CString &strLocalName, const XOutputHandler &pOutputHandler); XOutputHandler GetXmlOutputHandler(); XOutputHandler GetHtmlOutputHandler(); XOutputHandler GetTextOutputHandler(); };
The default implementation of the output handler.
It supports all standard XSLT output methods.
The basic output handler encapsulates the list of output handlers implementing various standard and extension output methods.
See
COutputHandler
for general discussion
of output handlers.
CEncodingHandler, COutputOptions, COutputHandler
Constructor/Destructor Summary | |
CBasicOutputHandler
();
����������Constructs the basic output handler. |
|
~CBasicOutputHandler
();
����������Destroys the basic output handler. |
Function Summary | |
void
|
SetOptions
(const XOutputOptions &pOutputOptions);
����������Sets output options for this output handler. |
void
|
StartDocument
();
����������Receives notification of the beginning of a document or a result tree fragment. |
void
|
EndDocument
();
����������Receives notification of the end of a document or a result tree fragment. |
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
|
StartNamespace
(const CString &strName);
����������Receives notification of the beginning of a namespace declaration. |
void
|
EndNamespace
();
����������Receives notification of the end of a namespace declaration. |
void
|
CharacterData
(const WCHAR *pData, int nSize, int nOptions=0);
����������Receives notification of character data. |
void
|
StartComment
();
����������Receives notification of the beginning of a comment. |
void
|
EndComment
();
����������Receives notification of the end of a comment. |
void
|
StartCdataSection
();
����������Receives notification of the beginning of a CDATA section. |
void
|
EndCdataSection
();
����������Receives notification of the end of a CDATA section. |
void
|
EntityReference
(const CString &strName);
����������Receives notification of an entity reference. |
void
|
ProcessingInstruction
(const CString &strTarget, const CString &strData);
����������Receives notification of a processing instruction. |
void
|
SetEncodingHandler
(const XEncodingHandler &pEncodingHandler);
����������Sets the encoding handler. |
void
|
SetStream
(IStream *pStream);
����������Sets the stream to output the result. |
void
|
SetXmlOutputHandler
(const XOutputHandler &pOutputHandler);
����������Sets the custom XML output handler. |
void
|
SetHtmlOutputHandler
(const XOutputHandler &pOutputHandler);
����������Sets the custom HTML output handler. |
void
|
SetTextOutputHandler
(const XOutputHandler &pOutputHandler);
����������Sets the custom text output handler. |
void
|
AddExtensionOutputHandler
(const CString &strNamespaceUri, const CString &strLocalName, const XOutputHandler &pOutputHandler);
����������Adds the output handler for the given extension output method to the list of output handlers supported by the basic output handler. |
XOutputHandler
|
GetXmlOutputHandler
();
����������Returns the XML output handler provided by this basic output handler. |
XOutputHandler
|
GetHtmlOutputHandler
();
����������Returns the HTML output handler provided by this basic output handler. |
XOutputHandler
|
GetTextOutputHandler
();
����������Returns the text output handler provided by this basic output handler. |
Constructor/Destructor Detail |
CBasicOutputHandler();
Constructs the basic output handler.
~CBasicOutputHandler();
Destroys the basic output handler.
Function Detail |
void SetOptions( const XOutputOptions &pOutputOptions);
Sets output options for this output handler.
pOutputOptions
- the output optionsvoid StartDocument();
Receives notification of the beginning of a document or a result tree fragment.
This function is invoked only once per document, before any other event processing functions in this class.
This function is invoked even if the event stream represents a result tree fragment rather than a document.
void EndDocument();
Receives notification of the end of a document or a result tree fragment.
This function is invoked only once per document, after any other event processing functions in this class.
This function is invoked even if the event stream represents a result tree fragment rather than a document.
void StartElement( const CString &strName, const CString &strNamespaceUri);
Receives notification of the beginning of an element.
Both qualified name and namespace URI must be specified. The specified namespace URI (even if empty) is mandatory; it supersedes the namespace implicitly defined by the prefix of the specified qualified name.
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 namespaces in the scope on the element,
followed by all of the element's attributes, followed by
all of the element's content will be reported, in order,
before the coresponding
EndElement
event.
strName
- the qualified (prefixed) namestrNamespaceUri
- the namespace URI;
the empty string if the element has no namespace URIvoid EndElement();
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).
void StartAttribute( const CString &strName, const CString &strNamespaceUri);
Receives notification of the beginning of an attribute.
Both qualified name and namespace URI must be specified. The specified namespace URI (even if empty) is mandatory; it supersedes the namespace implicitly defined by the prefix of the specified qualified name.
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.
This function is never invoked to report
attributes corresponding to namespace declarations
(that is, having names started with
"xmlns"
).
strName
- the qualified (prefixed) namestrNamespaceUri
- the namespace URI;
the empty string if the element has no namespace URIvoid EndAttribute();
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.
void StartNamespace(const CString &strName);
Receives notification of the beginning of a namespace declaration.
Notifications must be generated for all namespace declarations in scope on every element in the result document (even for namespaces that are actually declared on the element's ancestor).
This function is invoked at the beginning
of every namespace declaration; there will be
a corresponding
EndNamespace
event for every
StartNamespace
event.
The namespace URI will be reported as one or more
CharacterData
events,
before the coresponding
EndNamespace
event.
void EndNamespace();
Receives notification of the end of a namespace declaration.
This function is invoked at the end of every
namespace declaration; there will be a corresponding
StartNamespace
event for every
EndNamespace
event.
void CharacterData( const WCHAR *pData, int nSize, int nOptions=0);
Receives notification of character data.
This function is invoked to report each chunk of character data, each chunk of the content of every comment, each chunk of every attribute value, and each chunk of the namespace URI in every namespace declaration.
Applications may supply all contiguous character data in a single chunk, or they may split it into several chunks.
The output options are represented by the set
of bit flags. The only allowed bit flag is
COutputHandler::disableOutputEscaping
.
pData
- the array of charactersnSize
- the number of characters
to read from the arraynOptions
- the set of bit flags
indicating output optionsvoid StartComment();
Receives notification of the beginning of a comment.
This function is invoked at the beginning
of every comment in the result document; there will be
a corresponding
EndComment
event for every
StartComment
event.
The contents of the comment will be reported as one or more
CharacterData
events,
before the coresponding
EndComment
event.
void EndComment();
Receives notification of the end of a comment.
This function is invoked at the end of every
comment in the result document; there will be a corresponding
StartComment
event for every
EndComment
event.
void StartCdataSection();
Receives notification of the beginning of a CDATA section.
This function is invoked at the beginning
of every CDATA section in the result document; there will be
a corresponding
EndCdataSection
event for every
StartCdataSection
event.
The contents of the CDATA section will be reported as one or more
CharacterData
events,
before the coresponding
EndCdataSection
event.
In the current release of the toolkit, this function is never called by the XSLT engine. It is reserved for the future.
void EndCdataSection();
Receives notification of the end of a CDATA section.
This function is invoked at the end of every
CDATA section in the result document; there will be a corresponding
StartCdataSection
event for every
EndCdataSection
event.
In the current release of the toolkit, this function is never called by the XSLT engine. It is reserved for the future.
void EntityReference(const CString &strName);
Receives notification of an entity reference.
This function is invoked for each entity skipped.
In the current release of the toolkit, this function is never called by the XSLT engine. It is reserved for the future.
strName
- the entity namevoid ProcessingInstruction( const CString &strTarget, const CString &strData);
Receives notification of a processing instruction.
This function is invoked once for each processing instruction in the result document.
strTarget
- the processing instruction targetstrData
- the processing instruction data;
the empty string if none was suppliedvoid SetEncodingHandler( const XEncodingHandler &pEncodingHandler);
Sets the encoding handler.
pEncodingHandler
- the encoding handlervoid SetStream(IStream *pStream);
Sets the stream to output the result.
pStream
- the stream to output the resultvoid SetXmlOutputHandler(const XOutputHandler &pOutputHandler);
Sets the custom XML output handler.
The custom XML output handler will replace the default XML output handler implemented by the basic output handler.
pOutputHandler
- the custom XML output handlervoid SetHtmlOutputHandler(const XOutputHandler &pOutputHandler);
Sets the custom HTML output handler.
The custom HTML output handler will replace the default HTML output handler implemented by the basic output handler.
pOutputHandler
- the custom HTML output handlervoid SetTextOutputHandler(const XOutputHandler &pOutputHandler);
Sets the custom text output handler.
The custom text output handler will replace the default text output handler implemented by the basic output handler.
pOutputHandler
- the custom text output handlervoid AddExtensionOutputHandler( const CString &strNamespaceUri, const CString &strLocalName, const XOutputHandler &pOutputHandler);
Adds the output handler for the given extension output method to the list of output handlers supported by the basic output handler.
strNamespaceUri
- the namespace URI of the extension output methodstrLocalName
- the local name of the extension output methodpOutputHandler
- the output handler implementing
the extension output methodXOutputHandler GetXmlOutputHandler();
Returns the XML output handler provided by this basic output handler.
XOutputHandler GetHtmlOutputHandler();
Returns the HTML output handler provided by this basic output handler.
XOutputHandler GetTextOutputHandler();
Returns the text output handler provided by this basic output handler.
|
Unicorn XML Toolkit Version 1.00.00 |
|||||||||
� PREV CLASS ��NEXT CLASS | FRAMES��NO FRAMES | |||||||||
SUMMARY: � CONSTR �|� FUNCTION �|�DATA | DETAIL: � CONSTR �|� FUNCTION �|�DATA |