Unicorn XML Toolkit
Version 1.00.00

Namespace EcmaScriptXpath
Class CXpathExtension

class CXpathExtension {
public:
    CXpathExtension(const XGlobalObject &pGlobalObject);
    ~CXpathExtension();
public:
    void Register(
        const CString &strPropertyName,
        const XObject &pDomObject);
    XObject GetXpathObject();
    };

The XPath extension package for the ECMAScript interpreter.

This class implements XPath extensions for ECMAScript interpreter as specified in Unicorn ECMAScript Interpreter Reference Manual. XPath Extensions Version 2.0.

Every object of this class must be associated with an ECMAScript interpreter (an object of class EcmaScript::CInterpreter ). When an XPath extension package is constructed, the global object of the associated ECMAScript interpreter must be specified as an argument of the constructor. Once the CXPathExtension object is constructed, its member function Register must be called in order to create the initial set of XPath extension objects in the object space of the associated ECMAScript interpreter.

Since:
1.00.00
Version:
1.00.00
Author:
Alexey Gokhberg
See Also:
EcmaScript::CObject, EcmaScript::CGlobalObject
Constructor/Destructor Summary
CXpathExtension (const XGlobalObject &pGlobalObject);
����������Constructs the XPath extension package.
~CXpathExtension ();
����������Destroys the XPath extension package.

Function Summary
void Register (const CString &strPropertyName, const XObject &pDomObject);
����������Registers this XPath extension package with the associated ECMAScript interpreter.
XObject GetXpathObject ();
����������Returns the XPath extension root object.

Constructor/Destructor Detail

CXpathExtension

CXpathExtension(const XGlobalObject &pGlobalObject);

Constructs the XPath extension package.

Parameters:
pGlobalObject - the ECMAScript global object. The ECMAScript interpreter which owns the specified global object will be associated with this XPath extension package.

~CXpathExtension

~CXpathExtension();

Destroys the XPath extension package.

Function Detail

Register

void Register(
    const CString &strPropertyName,
    const XObject &pDomObject);

Registers this XPath extension package with the associated ECMAScript interpreter.

This function creates the initial set of XPath extension objects in the object space of the ECMAScript interpreter associated with this XPath extension package.

The XML extension package (see EcmaScriptXml::CXmlExtension ), as well as the DOM extension package (see EcmaScriptDom::CDomExtension ), must be constructed and registered prior to the registration of this XPath extension package.

The following information is required for the package registration:

Parameters:
strPropertyName - a string containing the name of the global object property to be bound to the XPath extension root object
pDomObject - the DOM extension root object

GetXpathObject

XObject GetXpathObject();

Returns the XPath extension root object.

Returns:
the XPath extension root object

Unicorn XML Toolkit
Version 1.00.00


This document was created using Unicorn DOC++.

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