xpointer

Name

xpointer -- 

Synopsis



struct      xmlLocationSet;
typedef     xmlLocationSetPtr;
xmlLocationSetPtr xmlXPtrLocationSetCreate  (xmlXPathObjectPtr val);
void        xmlXPtrFreeLocationSet          (xmlLocationSetPtr obj);
xmlLocationSetPtr xmlXPtrLocationSetMerge   (xmlLocationSetPtr val1,
                                             xmlLocationSetPtr val2);
xmlXPathObjectPtr xmlXPtrNewRangeNodeObject (xmlNodePtr start,
                                             xmlXPathObjectPtr end);
void        xmlXPtrLocationSetAdd           (xmlLocationSetPtr cur,
                                             xmlXPathObjectPtr val);
xmlXPathObjectPtr xmlXPtrWrapLocationSet    (xmlLocationSetPtr val);
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;


xmlXPtrLocationSetCreate ()

xmlLocationSetPtr xmlXPtrLocationSetCreate  (xmlXPathObjectPtr val);

Create a new xmlLocationSetPtr of type double and of value val

val : an initial xmlXPathObjectPtr, or NULL
Returns :the newly created object.


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.


xmlXPtrNewRangeNodeObject ()

xmlXPathObjectPtr xmlXPtrNewRangeNodeObject (xmlNodePtr start,
                                             xmlXPathObjectPtr end);

Create a new xmlXPathObjectPtr of type range from a not to an object

start : the starting node
end : the ending object
Returns :the newly created object.


xmlXPtrLocationSetAdd ()

void        xmlXPtrLocationSetAdd           (xmlLocationSetPtr cur,
                                             xmlXPathObjectPtr val);

add a new xmlXPathObjectPtr ot an existing LocationSet If the location already exist in the set val is freed.

cur : the initial range set
val : a new xmlXPathObjectPtr


xmlXPtrWrapLocationSet ()

xmlXPathObjectPtr xmlXPtrWrapLocationSet    (xmlLocationSetPtr val);

Wrap the LocationSet val in a new xmlXPathObjectPtr

val : the LocationSet value
Returns :the newly created object.


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