Unicorn XML Toolkit
Version 1.00.00

Namespace Xslt
Class CProcessor

class CProcessor: public Sax::CXmlStream {
public:
    CProcessor(const XXsltImplementation &pXsltImplementation);
    ~CProcessor();
public:
    bool GetNamespaces();
    void SetContentHandler(const Sax::XContentHandler &pHandler);
    Sax::XContentHandler GetContentHandler();
    void Start();
public:
    void SetSourceUri(const CString &strUri);
    void SetSourceNode(const XNode &pNode);
    void SetSourceStream(const Sax::XXmlStream &pStream);
    CString GetSourceUri();
    XNode GetSourceNode();
    Sax::XXmlStream GetSourceStream();
public:
    void SetStylesheetUri(const CString &strUri);
    void SetStylesheetNode(const XNode &pNode);
    void SetStylesheetStream(const Sax::XXmlStream &pStream);
    void SetStylesheet(const XStylesheetHandler &pStylesheet);
    CString GetStylesheetUri();
    XNode GetStylesheetNode();
    Sax::XXmlStream GetStylesheetStream();
    XStylesheetHandler GetStylesheet();
public:
    void SetResultUri(const CString &strUri);
    void SetResultNode(const XNode &pNode);
    void SetResultHandler(const Sax::XContentHandler &pHandler);
    CString GetResultUri();
    XNode GetResultNode();
    Sax::XContentHandler GetResultHandler();
public:
    void SetOutputHandler(const XOutputHandler &pOutputHandler);
    XOutputHandler GetOutputHandler();
public:
    void ResetParam();
    void ResetParam(const CExternalParamList ¶mList);
    void AddParam(const CString &strQName, const XValue &pValue);
    void AddParam(
        const CString &strNamespaceUri,
        const CString &strLocalName,
        const XValue &pValue);
public:
    void Reset();
    };

The XSLT processor.

This class also implements the interface of an XML stream; objects of this class may participate in XML stream / content handler processing chains.

Since:
1.00.00
Version:
1.00.00
Author:
Alexey Gokhberg
See Also:
CXsltImplementation, COutputHandler, CStylesheetHandler, Sax::CXmlStream, Sax::CContentHandler, Dom::INode, Xpath::CValue
Constructor/Destructor Summary
CProcessor (const XXsltImplementation &pXsltImplementation);
����������Constructs the XSLT processor.
~CProcessor ();
����������Destroys the XSLT processor.

Function Summary
bool GetNamespaces ();
����������Tests whether the XML stream implemented by this XSLT processor generates namespace information.
void SetContentHandler (const Sax::XContentHandler &pHandler);
����������Sets the content handler for the XML stream implemented by this XSLT processor.
Sax::XContentHandler GetContentHandler ();
����������Returns the content handler assigned to the XML stream implemented by this XSLT processor.
void Start ();
����������Starts the XML stream implemented by this XSLT processor
void SetSourceUri (const CString &strUri);
����������Sets the URI of the source document.
void SetSourceNode (const XNode &pNode);
����������Sets the XDM node that represents the root of the source document.
void SetSourceStream (const Sax::XXmlStream &pStream);
����������Sets the XML stream that provides content of the source document.
CString GetSourceUri ();
����������Returns the URI of the source document.
XNode GetSourceNode ();
����������Returns the XDM node that represents the root of the source document
Sax::XXmlStream GetSourceStream ();
����������Returns the XML stream that provides content of the source document.
void SetStylesheetUri (const CString &strUri);
����������Sets the URI of the stylesheet.
void SetStylesheetNode (const XNode &pNode);
����������Sets the XDM node that represents the root of the stylesheet.
void SetStylesheetStream (const Sax::XXmlStream &pStream);
����������Sets the XML stream that provides content of the stylesheet.
void SetStylesheet (const XStylesheetHandler &pStylesheet);
����������Sets the XSLT stylesheet.
CString GetStylesheetUri ();
����������Returns the URI of the stylesheet.
XNode GetStylesheetNode ();
����������Returns the XDM node that represents the root of the stylesheet.
Sax::XXmlStream GetStylesheetStream ();
����������Returns the XML stream that provides content of the stylesheet.
XStylesheetHandler GetStylesheet ();
����������Returns the XSLT stylesheet.
void SetResultUri (const CString &strUri);
����������Sets the URI of the result document.
void SetResultNode (const XNode &pNode);
����������Sets the XDM node to be used as the root of the result document.
void SetResultHandler (const Sax::XContentHandler &pHandler);
����������Sets the content handler to receive content of the result document.
CString GetResultUri ();
����������Returns the URI of the result document.
XNode GetResultNode ();
����������Returns the XDM node to be used as the root of the result document.
Sax::XContentHandler GetResultHandler ();
����������Returns the content handler to receive content of the result document.
void SetOutputHandler (const XOutputHandler &pOutputHandler);
����������Sets the custom output handler.
XOutputHandler GetOutputHandler ();
����������Returns the custom output handler.
void ResetParam ();
����������Clears the list of values of the stylesheet external parameters.
void ResetParam (const CExternalParamList ¶mList);
����������Reinitializes the list of values of the stylesheet external parameters, copying the given parameter list.
void AddParam (const CString &strQName, const XValue &pValue);
����������Adds the parameter value to the list of values of the stylesheet external parameters; the parameter is identified by its qualified name.
void AddParam (const CString &strNamespaceUri, const CString &strLocalName, const XValue &pValue);
����������Adds the parameter value to the list of values of the stylesheet external parameters; the parameter is identified by its namespace URI and local name.
void Reset ();
����������Resets properties of this processor.

Constructor/Destructor Detail

CProcessor

CProcessor(const XXsltImplementation &pXsltImplementation);

Constructs the XSLT processor.

Parameters:
pXsltImplementation - the XSLT implementation

~CProcessor

~CProcessor();

Destroys the XSLT processor.

Function Detail

GetNamespaces

bool GetNamespaces();

Tests whether the XML stream implemented by this XSLT processor generates namespace information.

Returns:
true if the XML stream implemented by this XSLT processor generates namespace information; false otherwise

SetContentHandler

void SetContentHandler(const Sax::XContentHandler &pHandler);

Sets the content handler for the XML stream implemented by this XSLT processor.

Parameters:
pHandler - the content handler

GetContentHandler

Sax::XContentHandler GetContentHandler();

Returns the content handler assigned to the XML stream implemented by this XSLT processor.

Returns:
the content handler assigned to the XML stream implemented by this XSLT processor

Start

void Start();

Starts the XML stream implemented by this XSLT processor

Call to this function starts XSLT transformation.

SetSourceUri

void SetSourceUri(const CString &strUri);

Sets the URI of the source document.

Parameters:
strUri - the URI of the source document

SetSourceNode

void SetSourceNode(const XNode &pNode);

Sets the XDM node that represents the root of the source document.

Parameters:
pNode - the XDM node that represents the root of the source document

SetSourceStream

void SetSourceStream(const Sax::XXmlStream &pStream);

Sets the XML stream that provides content of the source document.

Parameters:
pStream - the XML stream that provides content of the source document

GetSourceUri

CString GetSourceUri();

Returns the URI of the source document.

Returns:
the URI of the source document, or the empty string if none was specified

GetSourceNode

XNode GetSourceNode();

Returns the XDM node that represents the root of the source document

Returns:
the XDM node representing the root of the source document, or NULL if none was specified

GetSourceStream

Sax::XXmlStream GetSourceStream();

Returns the XML stream that provides content of the source document.

Returns:
the XML stream that provides content of the source document, or NULL if none was specified

SetStylesheetUri

void SetStylesheetUri(const CString &strUri);

Sets the URI of the stylesheet.

Parameters:
strUri - the URI of the stylesheet

SetStylesheetNode

void SetStylesheetNode(const XNode &pNode);

Sets the XDM node that represents the root of the stylesheet.

Parameters:
pNode - the XDM node that represents the root of the stylesheet

SetStylesheetStream

void SetStylesheetStream(const Sax::XXmlStream &pStream);

Sets the XML stream that provides content of the stylesheet.

Parameters:
pStream - the XML stream that provides content of the stylesheet

SetStylesheet

void SetStylesheet(const XStylesheetHandler &pStylesheet);

Sets the XSLT stylesheet.

Parameters:
pStylesheet - the XSLT stylesheet

GetStylesheetUri

CString GetStylesheetUri();

Returns the URI of the stylesheet.

Returns:
the URI of the stylesheet, or the empty string if none was specified

GetStylesheetNode

XNode GetStylesheetNode();

Returns the XDM node that represents the root of the stylesheet.

Returns:
the XDM node that represents the root of the stylesheet, or NULL if none was specified

GetStylesheetStream

Sax::XXmlStream GetStylesheetStream();

Returns the XML stream that provides content of the stylesheet.

Returns:
the XML stream that provides content of the stylesheet, or NULL if none was specified

GetStylesheet

XStylesheetHandler GetStylesheet();

Returns the XSLT stylesheet.

Returns:
the XSLT stylesheet, or NULL if none was specified

SetResultUri

void SetResultUri(const CString &strUri);

Sets the URI of the result document.

Parameters:
strUri - the URI of the result document

SetResultNode

void SetResultNode(const XNode &pNode);

Sets the XDM node to be used as the root of the result document.

Parameters:
pNode - the XDM node to be used as the root of the result document

SetResultHandler

void SetResultHandler(const Sax::XContentHandler &pHandler);

Sets the content handler to receive content of the result document.

Parameters:
pHandler - the content handler to receive content of the result document

GetResultUri

CString GetResultUri();

Returns the URI of the result document.

Returns:
the URI of the result document, or the empty string if none was specified

GetResultNode

XNode GetResultNode();

Returns the XDM node to be used as the root of the result document.

Returns:
the XDM node to be used as the root of the result document, or NULL if none was specified

GetResultHandler

Sax::XContentHandler GetResultHandler();

Returns the content handler to receive content of the result document.

Returns:
the content handler to receive content of the result document, or NULL if none was specified

SetOutputHandler

void SetOutputHandler(const XOutputHandler &pOutputHandler);

Sets the custom output handler.

Parameters:
pOutputHandler - the custom output handler

GetOutputHandler

XOutputHandler GetOutputHandler();

Returns the custom output handler.

Returns:
the custom output handler, or NULL if none was specified

ResetParam

void ResetParam();

Clears the list of values of the stylesheet external parameters.

ResetParam

void ResetParam(const CExternalParamList ¶mList);

Reinitializes the list of values of the stylesheet external parameters, copying the given parameter list.

Parameters:
paramList - the parameter list to copy

AddParam

void AddParam(const CString &strQName, const XValue &pValue);

Adds the parameter value to the list of values of the stylesheet external parameters; the parameter is identified by its qualified name.

Parameters:
strQName - the qualified name of the parameter
pValue - the value of the parameter

AddParam

void AddParam(
    const CString &strNamespaceUri,
    const CString &strLocalName,
    const XValue &pValue);

Adds the parameter value to the list of values of the stylesheet external parameters; the parameter is identified by its namespace URI and local name.

Parameters:
strNamespaceUri - the namespace URI of the parameter
strLocalName - the local name of the parameter
pValue - the value of the parameter

Reset

void Reset();

Resets properties of this processor.

All properties related to the source document, the stylesheet and the result document become unspecified. The list of values of the external parameters becomes empty.


Unicorn XML Toolkit
Version 1.00.00


This document was created using Unicorn DOC++.

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