| Gnome XML Library Reference Manual | |||
|---|---|---|---|
| <<< Previous Page | Home | Up | Next Page >>> |
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); |
struct xmlLocationSet {
int locNr; /* number of locations in the set */
int locMax; /* size of the array as allocated */
xmlXPathObjectPtr *locTab;/* array of locations */
}; |
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. |
void xmlXPtrFreeLocationSet (xmlLocationSetPtr obj); |
Free the LocationSet compound (not the actual ranges !).
| obj : | the xmlLocationSetPtr to free |
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. |
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. |
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 |
xmlXPathObjectPtr xmlXPtrWrapLocationSet (xmlLocationSetPtr val); |
Wrap the LocationSet val in a new xmlXPathObjectPtr
| val : | the LocationSet value |
| Returns : | the newly created object. |
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. |
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. |
void xmlXPtrRangeToFunction (xmlXPathParserContextPtr ctxt, int nargs); |
Implement the range-
| ctxt : | the XPointer Parser context |
| nargs : |
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. |
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 |