Unicorn XML Toolkit
Version 1.00.00

Namespace Xslt
Class CLocationHandler

class CLocationHandler: public CInterface {
public:
    CLocationHandler();
    virtual ~CLocationHandler();
public:
    virtual void SetParent(const XLocationHandler &pParent) = 0;
    virtual void AddLocation(
        const CNodeId &nodeId,
        const CString &strPublicId,
        const CString &strSystemId,
        int nLineNumber,
        int nColumnNumber) = 0;
    virtual bool FindLocation(
        const CNodeId &nodeId,
        CString &strPublicId,
        CString &strSystemId,
        int &nLineNumber,
        int &nColumnNumber) = 0;
    virtual bool GetBaseUri(
        const CNodeId &nodeId, 
        CString &strBaseUri) = 0;
    virtual void RemoveDocument(const CNodeId &nodeId) = 0;
    };

The abstract interface for locating stylesheet and document nodes in source XML documents.

Every location handler provides location information for a collection of nodes which belong to one or more documents. A location handler may reference another (parent) location handler. Location handlers inherit all location information from their parents.

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

Function Summary
void SetParent (const XLocationHandler &pParent);
����������Sets the parent for this location handler.
void AddLocation (const CNodeId &nodeId, const CString &strPublicId, const CString &strSystemId, int nLineNumber, int nColumnNumber);
����������Adds location information for the single node.
bool FindLocation (const CNodeId &nodeId, CString &strPublicId, CString &strSystemId, int &nLineNumber, int &nColumnNumber);
����������Looks up the location of the node with the given node identifier.
bool GetBaseUri (const CNodeId &nodeId, CString &strBaseUri);
����������Looks up the base URI of the node with the given node identifier.
void RemoveDocument (const CNodeId &nodeId);
����������Deletes the location information for all nodes which belong to the document with the given node identifier.

Constructor/Destructor Detail

CLocationHandler

CLocationHandler();

Constructs the location handler.

~CLocationHandler

virtual ~CLocationHandler();

Destroys the location handler.

Function Detail

SetParent

virtual void SetParent(const XLocationHandler &pParent) = 0;

Sets the parent for this location handler.

All location information handled by the parent will be inherited by this location handler.

Parameters:
pParent - the parent location handler

AddLocation

virtual void AddLocation(
    const CNodeId &nodeId,
    const CString &strPublicId,
    const CString &strSystemId,
    int nLineNumber,
    int nColumnNumber) = 0;

Adds location information for the single node.

Parameters:
nodeId - the node identifier
strPublicId - the public identifier of the entity containing the node
strSystemId - the system identifier of the entity containing the node
nLineNumber - the line number corresponding to the start of the node
nColumnNumber - the column number corresponding to the start of the node

FindLocation

virtual bool FindLocation(
    const CNodeId &nodeId,
    CString &strPublicId,
    CString &strSystemId,
    int &nLineNumber,
    int &nColumnNumber) = 0;

Looks up the location of the node with the given node identifier.

Parameters:
nodeId - the node identifier to look up
strPublicId - on return, the public identifier corresponding to the given node identifier; unspecified if the node identifier is not found
strSystemId - on return, the system identifier corresponding to the given node identifier; unspecified if the node identifier is not found
nLineNumber - on return, the line number corresponding to the given node identifier; unspecified if the node identifier is not found
nColumnNumber - on return, the column number corresponding to the given node identifier; unspecified if the node identifier is not found
Returns:
true if the node with the given XDM identifier is found; false otherwise

GetBaseUri

virtual bool GetBaseUri(
    const CNodeId &nodeId, 
    CString &strBaseUri) = 0;

Looks up the base URI of the node with the given node identifier.

Parameters:
nodeId - the node identifier to look up
strBaseUri - on return, the base URI corresponding to the given node identifier; unspecified if the node identifier is not found
Returns:
true if the node with the given XDM identifier is found; false otherwise

RemoveDocument

virtual void RemoveDocument(const CNodeId &nodeId) = 0;

Deletes the location information for all nodes which belong to the document with the given node identifier.

Parameters:
nodeId - the node identifier of the document

Unicorn XML Toolkit
Version 1.00.00


This document was created using Unicorn DOC++.

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