GdomeXPathEvaluator

Name

GdomeXPathEvaluator -- Interface XPathEvaluator implementation.

Synopsis



struct      GdomeXPathEvaluator;
GdomeXPathEvaluator* gdome_xpeval_mkref     (void);
void        gdome_xpeval_ref                (GdomeXPathEvaluator *self,
                                             GdomeException *exc);
void        gdome_xpeval_unref              (GdomeXPathEvaluator *self,
                                             GdomeException *exc);
GdomeXPathNSResolver* gdome_xpeval_createNSResolver
                                            (GdomeXPathEvaluator *self,
                                             GdomeNode *nodeResolver,
                                             GdomeException *exc);
GdomeXPathResult* gdome_xpeval_createResult (GdomeXPathEvaluator *self,
                                             GdomeException *exc);
GdomeXPathResult* gdome_xpeval_evaluate     (GdomeXPathEvaluator *self,
                                             GdomeDOMString *expression,
                                             GdomeNode *contextNode,
                                             GdomeXPathNSResolver *resolver,
                                             unsigned int type,
                                             GdomeXPathResult *result,
                                             GdomeException *exc);

Description

This implements the DOM Level 3 XPath W3C Working Draft 08 February 2002. API SUBJECT TO CHANGE!

The evaluation of XPath expressions is provided by GdomeXPathEvaluator, which will provide evaluation of XPath 1.0 expressions with no specialized extension functions or variables. It is expected that the GdomeXPathEvaluator interface will be implemented on the same object which implements the GdomeDocument interface in an implementation which supports the XPath DOM module. GdomeXPathEvaluator implementations may be available from other sources that may provide support for new versions of XPath or special extension functions or variables which are not defined in this specification.

Details

struct GdomeXPathEvaluator

struct GdomeXPathEvaluator {
	gpointer user_data;
};


gdome_xpeval_mkref ()

GdomeXPathEvaluator* gdome_xpeval_mkref     (void);

Constructor of the XPathEvaluator interface.

Returns : the reference to the XPathEvaluator structure.


gdome_xpeval_ref ()

void        gdome_xpeval_ref                (GdomeXPathEvaluator *self,
                                             GdomeException *exc);

Increase the reference count of the XPathEvaluator structure.

self : XPathEvaluator Object ref
exc : Exception Object ref


gdome_xpeval_unref ()

void        gdome_xpeval_unref              (GdomeXPathEvaluator *self,
                                             GdomeException *exc);

Decrease the reference count of the XPathEvaluator. Free the structure if XPathEvaluator will have zero reference.

self : XPathEvaluator Object ref
exc : Exception Object ref


gdome_xpeval_createNSResolver ()

GdomeXPathNSResolver* gdome_xpeval_createNSResolver
                                            (GdomeXPathEvaluator *self,
                                             GdomeNode *nodeResolver,
                                             GdomeException *exc);

Adapts any DOM node to resolve namespaces so that an XPath expression can be easily evaluated relative to the context of the node where it appeared within the document.

self : GdomeXPathEvaluator Object ref
nodeResolver : The node to be used as a context for namespace resolution.
exc : Exception Object ref
Returns : GdomeXPathNSResolver object.


gdome_xpeval_createResult ()

GdomeXPathResult* gdome_xpeval_createResult (GdomeXPathEvaluator *self,
                                             GdomeException *exc);

self : GdomeXPathEvaluator Object ref
exc : Exception Object ref
Returns : an GdomeXPathResult object which may be passed as a parameter to the evaluation methods of this GdomeXPathEvaluator so that a new one is not created on each call to an evaluation method.


gdome_xpeval_evaluate ()

GdomeXPathResult* gdome_xpeval_evaluate     (GdomeXPathEvaluator *self,
                                             GdomeDOMString *expression,
                                             GdomeNode *contextNode,
                                             GdomeXPathNSResolver *resolver,
                                             unsigned int type,
                                             GdomeXPathResult *result,
                                             GdomeException *exc);

Evaluates an XPath expression string

self : GdomeXPathEvaluator Object ref
expression : The XPath expression string to be parsed and evaluated.
contextNode : Context node for the evaluation of this XPath expression.
resolver : The resolver permits translation of prefixes within the XPath expression into appropriate namespace URIs.
type : If specified, result will be coerced to return the specified type.
result : Specifies a GdomeXPathResult object to be re-used.
exc : Exception Object ref
Returns : a result of the specified type if possible.