Unicorn XML Toolkit
Version 1.00.00

Namespace Xslt
Class CBasicInputHandler

class CBasicInputHandler: public CInputHandler {
public:
    CBasicInputHandler(
        const XXsltImplementation &pXsltImplementation,
        const XParser &pParser);
    ~CBasicInputHandler();
public:
    void CreateDocument(
        const XDocument &pDocument, 
        const XLocationHandler &pLocationHandler,
        const XSpaceHandler &pSpaceHandler,
        const XDtdHandler &pDtdHandler);
    void CreateDocument(
        const XDocument &pDocument,
        const CString &strUri, 
        const XLocationHandler &pLocationHandler,
        const XSpaceHandler &pSpaceHandler,
        const XDtdHandler &pDtdHandler);
    void CreateDocument(
        const XDocument &pDocument,
        const Sax::XXmlStream &pStream, 
        const XLocationHandler &pLocationHandler,
        const XSpaceHandler &pSpaceHandler,
        const XDtdHandler &pDtdHandler);
    XNodeSet GetFragment(
        const XDocument &pDocument,
        const CString &strUri);
    };

The default implementation of the input handler.

See CInputHandler for general discussion of input handlers.

Since:
1.00.00
Version:
1.00.00
Author:
Alexey Gokhberg
See Also:
CSpaceHandler, CLocationHandler, Sxp::IDtdHandler, Sax::CXmlStream
Constructor/Destructor Summary
CBasicInputHandler (const XXsltImplementation &pXsltImplementation, const XParser &pParser);
����������Constructs the basic input handler.
~CBasicInputHandler ();
����������Destroys the basic input handler.

Function Summary
void CreateDocument (const XDocument &pDocument, const XLocationHandler &pLocationHandler, const XSpaceHandler &pSpaceHandler, const XDtdHandler &pDtdHandler);
����������Creates a document from an XDM source.
void CreateDocument (const XDocument &pDocument, const CString &strUri, const XLocationHandler &pLocationHandler, const XSpaceHandler &pSpaceHandler, const XDtdHandler &pDtdHandler);
����������Creates a document from an URI.
void CreateDocument (const XDocument &pDocument, const Sax::XXmlStream &pStream, const XLocationHandler &pLocationHandler, const XSpaceHandler &pSpaceHandler, const XDtdHandler &pDtdHandler);
����������Creates a document from an XML stream.
XNodeSet GetFragment (const XDocument &pDocument, const CString &strUri);
����������Fetches the document fragment from the given document based on the given URI.

Constructor/Destructor Detail

CBasicInputHandler

CBasicInputHandler(
    const XXsltImplementation &pXsltImplementation,
    const XParser &pParser);

Constructs the basic input handler.

Parameters:
pXsltImplementation - the XSLT implementation
pParser - the SXP parser

~CBasicInputHandler

~CBasicInputHandler();

Destroys the basic input handler.

Function Detail

CreateDocument

void CreateDocument(
    const XDocument &pDocument, 
    const XLocationHandler &pLocationHandler,
    const XSpaceHandler &pSpaceHandler,
    const XDtdHandler &pDtdHandler);

Creates a document from an XDM source.

This function receives the XDM document (which must support XDM extensions) and modifies this document in place. Text nodes containing whitespace characters only are stripped as required by XSLT, using the space handler supplied as the function parameter. Adjacent text nodes are merged.

This is a deprecated function, not to be used in new applications.

Parameters:
pDocument - the source XDM document, will be modified in place
pLocationHandler - unused, must be set to NULL
pSpaceHandler - the space handler to control the whitespace stripping process
pDtdHandler - unused, must be set to NULL

CreateDocument

void CreateDocument(
    const XDocument &pDocument,
    const CString &strUri, 
    const XLocationHandler &pLocationHandler,
    const XSpaceHandler &pSpaceHandler,
    const XDtdHandler &pDtdHandler);

Creates a document from an URI.

The empty document must be passed as a parameter to this function. On return, this document receives content obtained by parsing XML data located at the given URI. The whitespace is stripped as required by XSLT.

The DTD handler required as the parameter of this function is supplied by the XSLT engine. Tookit users are not required to provide a specific implementation of the DTD handler.

Parameters:
pDocument - the document to be created
strUri - the source URI
pLocationHandler - the location handler to register locations of document nodes
pSpaceHandler - the space handler to control the whitespace stripping process
pDtdHandler - the SXP DTD handler to handle DTD-related information relevant for XSLT processing

CreateDocument

void CreateDocument(
    const XDocument &pDocument,
    const Sax::XXmlStream &pStream, 
    const XLocationHandler &pLocationHandler,
    const XSpaceHandler &pSpaceHandler,
    const XDtdHandler &pDtdHandler);

Creates a document from an XML stream.

The empty document must be passed as a parameter to this function. On return, this document receives content obtained from the given XML stream. The whitespace is stripped as required by XSLT.

Parameters:
pDocument - the document to be created
pStream - the source XML stream
pLocationHandler - the location handler to register locations of document nodes
pSpaceHandler - the space handler to control the whitespace stripping process
pDtdHandler - unused; must be set to NULL

GetFragment

XNodeSet GetFragment(
    const XDocument &pDocument,
    const CString &strUri);

Fetches the document fragment from the given document based on the given URI.

The URI may contain the fragment identifier.

This function is reserved for the future. The current implementation of the toolkit does not support this function.

Parameters:
pDocument - the source document
strUri - the document fragment URI
Returns:
the node-set containing the fetched document fragment

Unicorn XML Toolkit
Version 1.00.00


This document was created using Unicorn DOC++.

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