xpointer

Name

xpointer -- 

Synopsis



struct      xmlLocationSet;
typedef     xmlLocationSetPtr;
void        xmlXPtrFreeLocationSet          (xmlLocationSetPtr obj);
xmlLocationSetPtr xmlXPtrLocationSetMerge   (xmlLocationSetPtr val1,
                                             xmlLocationSetPtr val2);
xmlXPathContextPtr xmlXPtrNewContext        (xmlDocPtr doc,
                                             xmlNodePtr here,
                                             xmlNodePtr origin);
xmlXPathObjectPtr xmlXPtrEval               (const xmlChar *str,
                                             xmlXPathContextPtr ctx);
void        xmlXPtrRangeToFunction          (xmlXPathParserContextPtr ctxt,
                                             int nargs);
xmlNodePtr  xmlXPtrBuildNodeList            (xmlXPathObjectPtr obj);
void        xmlXPtrEvalRangePredicate       (xmlXPathParserContextPtr ctxt);

Description

Details

struct xmlLocationSet

struct xmlLocationSet {
    int locNr;		      /* number of locations in the set */
    int locMax;		      /* size of the array as allocated */
    xmlXPathObjectPtr *locTab;/* array of locations */
};


xmlLocationSetPtr

typedef xmlLocationSet *xmlLocationSetPtr;


xmlXPtrFreeLocationSet ()

void        xmlXPtrFreeLocationSet          (xmlLocationSetPtr obj);

Free the LocationSet compound (not the actual ranges !).

obj : the xmlLocationSetPtr to free


xmlXPtrLocationSetMerge ()

xmlLocationSetPtr xmlXPtrLocationSetMerge   (xmlLocationSetPtr val1,
                                             xmlLocationSetPtr val2);

Merges two rangesets, all ranges from val2 are added to val1

val1 : the first LocationSet
val2 : the second LocationSet
Returns :val1 once extended or NULL in case of error.


xmlXPtrNewContext ()

xmlXPathContextPtr xmlXPtrNewContext        (xmlDocPtr doc,
                                             xmlNodePtr here,
                                             xmlNodePtr origin);

Create a new XPointer context

doc : the XML document
here : the node that directly contains the XPointer being evaluated or NULL
origin : the element from which a user or program initiated traversal of the link, or NULL.
Returns :the xmlXPathContext just allocated.


xmlXPtrEval ()

xmlXPathObjectPtr xmlXPtrEval               (const xmlChar *str,
                                             xmlXPathContextPtr ctx);

Evaluate the XPath Location Path in the given context.

str : the XPointer expression
ctx : the XPointer context
Returns :the xmlXPathObjectPtr resulting from the eveluation or NULL. the caller has to free the object.


xmlXPtrRangeToFunction ()

void        xmlXPtrRangeToFunction          (xmlXPathParserContextPtr ctxt,
                                             int nargs);

Implement the range-to() XPointer function

ctxt : the XPointer Parser context
nargs :


xmlXPtrBuildNodeList ()

xmlNodePtr  xmlXPtrBuildNodeList            (xmlXPathObjectPtr obj);

Build a node list tree copy of the XPointer result.

obj : the XPointer result from the evaluation.
Returns :an xmlNodePtr list or NULL. the caller has to free the node tree.


xmlXPtrEvalRangePredicate ()

void        xmlXPtrEvalRangePredicate       (xmlXPathParserContextPtr ctxt);

[8] Predicate ::= '[' PredicateExpr ']' [9] PredicateExpr ::= Expr

Evaluate a predicate as in xmlXPathEvalPredicate() but for a Location Set instead of a node set

ctxt : the XPointer Parser context