deps/src/libxml2-2.9.1/doc/html/libxml-xpointer.html
| |
|
|
|
|
|
|
|
|
|
| API Menu | |
|
| API Indexes | |
|
| Related links | |
|
|
|
|
|
|
| | xpathInternals | | API documentation | | The XML C parser and toolkit of Gnome |
API to handle XML Pointers Base implementation was made accordingly to W3C Candidate Recommendation 7 June 2000
Structure[xmlLocationSet](#xmlLocationSet)
struct _xmlLocationSet
Typedef[xmlLocationSet](libxml-xpointer.html#xmlLocationSet)*xmlLocationSetPtr
[xmlNodePtr](libxml-tree.html#xmlNodePtr)[xmlXPtrBuildNodeList](#xmlXPtrBuildNodeList)([xmlXPathObjectPtr](libxml-xpath.html#xmlXPathObjectPtr)obj)
[xmlXPathObjectPtr](libxml-xpath.html#xmlXPathObjectPtr)[xmlXPtrEval](#xmlXPtrEval)(const[xmlChar](libxml-xmlstring.html#xmlChar)* str,
[xmlXPathContextPtr](libxml-xpath.html#xmlXPathContextPtr)ctx)
void[xmlXPtrEvalRangePredicate](#xmlXPtrEvalRangePredicate)([xmlXPathParserContextPtr](libxml-xpath.html#xmlXPathParserContextPtr)ctxt)
void[xmlXPtrFreeLocationSet](#xmlXPtrFreeLocationSet)([xmlLocationSetPtr](libxml-xpointer.html#xmlLocationSetPtr)obj)
void[xmlXPtrLocationSetAdd](#xmlXPtrLocationSetAdd)([xmlLocationSetPtr](libxml-xpointer.html#xmlLocationSetPtr)cur,
[xmlXPathObjectPtr](libxml-xpath.html#xmlXPathObjectPtr)val)
[xmlLocationSetPtr](libxml-xpointer.html#xmlLocationSetPtr)[xmlXPtrLocationSetCreate](#xmlXPtrLocationSetCreate)([xmlXPathObjectPtr](libxml-xpath.html#xmlXPathObjectPtr)val)
void[xmlXPtrLocationSetDel](#xmlXPtrLocationSetDel)([xmlLocationSetPtr](libxml-xpointer.html#xmlLocationSetPtr)cur,
[xmlXPathObjectPtr](libxml-xpath.html#xmlXPathObjectPtr)val)
[xmlLocationSetPtr](libxml-xpointer.html#xmlLocationSetPtr)[xmlXPtrLocationSetMerge](#xmlXPtrLocationSetMerge)([xmlLocationSetPtr](libxml-xpointer.html#xmlLocationSetPtr)val1,
[xmlLocationSetPtr](libxml-xpointer.html#xmlLocationSetPtr)val2)
void[xmlXPtrLocationSetRemove](#xmlXPtrLocationSetRemove)([xmlLocationSetPtr](libxml-xpointer.html#xmlLocationSetPtr)cur,
int val)
[xmlXPathObjectPtr](libxml-xpath.html#xmlXPathObjectPtr)[xmlXPtrNewCollapsedRange](#xmlXPtrNewCollapsedRange)([xmlNodePtr](libxml-tree.html#xmlNodePtr)start)
[xmlXPathContextPtr](libxml-xpath.html#xmlXPathContextPtr)[xmlXPtrNewContext](#xmlXPtrNewContext)([xmlDocPtr](libxml-tree.html#xmlDocPtr)doc,
[xmlNodePtr](libxml-tree.html#xmlNodePtr)here,
[xmlNodePtr](libxml-tree.html#xmlNodePtr)origin)
[xmlXPathObjectPtr](libxml-xpath.html#xmlXPathObjectPtr)[xmlXPtrNewLocationSetNodeSet](#xmlXPtrNewLocationSetNodeSet)([xmlNodeSetPtr](libxml-xpath.html#xmlNodeSetPtr)set)
[xmlXPathObjectPtr](libxml-xpath.html#xmlXPathObjectPtr)[xmlXPtrNewLocationSetNodes](#xmlXPtrNewLocationSetNodes)([xmlNodePtr](libxml-tree.html#xmlNodePtr)start,
[xmlNodePtr](libxml-tree.html#xmlNodePtr)end)
[xmlXPathObjectPtr](libxml-xpath.html#xmlXPathObjectPtr)[xmlXPtrNewRange](#xmlXPtrNewRange)([xmlNodePtr](libxml-tree.html#xmlNodePtr)start,
int startindex,
[xmlNodePtr](libxml-tree.html#xmlNodePtr)end,
int endindex)
[xmlXPathObjectPtr](libxml-xpath.html#xmlXPathObjectPtr)[xmlXPtrNewRangeNodeObject](#xmlXPtrNewRangeNodeObject)([xmlNodePtr](libxml-tree.html#xmlNodePtr)start,
[xmlXPathObjectPtr](libxml-xpath.html#xmlXPathObjectPtr)end)
[xmlXPathObjectPtr](libxml-xpath.html#xmlXPathObjectPtr)[xmlXPtrNewRangeNodePoint](#xmlXPtrNewRangeNodePoint)([xmlNodePtr](libxml-tree.html#xmlNodePtr)start,
[xmlXPathObjectPtr](libxml-xpath.html#xmlXPathObjectPtr)end)
[xmlXPathObjectPtr](libxml-xpath.html#xmlXPathObjectPtr)[xmlXPtrNewRangeNodes](#xmlXPtrNewRangeNodes)([xmlNodePtr](libxml-tree.html#xmlNodePtr)start,
[xmlNodePtr](libxml-tree.html#xmlNodePtr)end)
[xmlXPathObjectPtr](libxml-xpath.html#xmlXPathObjectPtr)[xmlXPtrNewRangePointNode](#xmlXPtrNewRangePointNode)([xmlXPathObjectPtr](libxml-xpath.html#xmlXPathObjectPtr)start,
[xmlNodePtr](libxml-tree.html#xmlNodePtr)end)
[xmlXPathObjectPtr](libxml-xpath.html#xmlXPathObjectPtr)[xmlXPtrNewRangePoints](#xmlXPtrNewRangePoints)([xmlXPathObjectPtr](libxml-xpath.html#xmlXPathObjectPtr)start,
[xmlXPathObjectPtr](libxml-xpath.html#xmlXPathObjectPtr)end)
void[xmlXPtrRangeToFunction](#xmlXPtrRangeToFunction)([xmlXPathParserContextPtr](libxml-xpath.html#xmlXPathParserContextPtr)ctxt,
int nargs)
[xmlXPathObjectPtr](libxml-xpath.html#xmlXPathObjectPtr)[xmlXPtrWrapLocationSet](#xmlXPtrWrapLocationSet)([xmlLocationSetPtr](libxml-xpointer.html#xmlLocationSetPtr)val)
Structure xmlLocationSet
struct _xmlLocationSet {
int locNr : number of locations in the set
int locMax : size of the array as allocated[xmlXPathObjectPtr](libxml-xpath.html#xmlXPathObjectPtr)* locTab : array of locations
}
[xmlNodePtr](libxml-tree.html#xmlNodePtr)xmlXPtrBuildNodeList ([xmlXPathObjectPtr](libxml-xpath.html#xmlXPathObjectPtr)obj)
Build a node list tree copy of the XPointer result. This will drop Attributes and Namespace declarations.
| obj: | the XPointer result from the evaluation. | | Returns: | an xmlNodePtr list or NULL. the caller has to free the node tree. |
[xmlXPathObjectPtr](libxml-xpath.html#xmlXPathObjectPtr)xmlXPtrEval (const[xmlChar](libxml-xmlstring.html#xmlChar)* str,
[xmlXPathContextPtr](libxml-xpath.html#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 evaluation or NULL. the caller has to free the object. |
void xmlXPtrEvalRangePredicate ([xmlXPathParserContextPtr](libxml-xpath.html#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 |
void xmlXPtrFreeLocationSet ([xmlLocationSetPtr](libxml-xpointer.html#xmlLocationSetPtr)obj)
Free the LocationSet compound (not the actual ranges !).
| obj: | the xmlLocationSetPtr to free |
void xmlXPtrLocationSetAdd ([xmlLocationSetPtr](libxml-xpointer.html#xmlLocationSetPtr)cur,
[xmlXPathObjectPtr](libxml-xpath.html#xmlXPathObjectPtr)val)
add a new xmlXPathObjectPtr to an existing LocationSet If the location already exist in the set @val is freed.
| cur: | the initial range set | | val: | a new xmlXPathObjectPtr |
[xmlLocationSetPtr](libxml-xpointer.html#xmlLocationSetPtr)xmlXPtrLocationSetCreate ([xmlXPathObjectPtr](libxml-xpath.html#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 xmlXPtrLocationSetDel ([xmlLocationSetPtr](libxml-xpointer.html#xmlLocationSetPtr)cur,
[xmlXPathObjectPtr](libxml-xpath.html#xmlXPathObjectPtr)val)
Removes an xmlXPathObjectPtr from an existing LocationSet
| cur: | the initial range set | | val: | an xmlXPathObjectPtr |
[xmlLocationSetPtr](libxml-xpointer.html#xmlLocationSetPtr)xmlXPtrLocationSetMerge ([xmlLocationSetPtr](libxml-xpointer.html#xmlLocationSetPtr)val1,
[xmlLocationSetPtr](libxml-xpointer.html#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. |
void xmlXPtrLocationSetRemove ([xmlLocationSetPtr](libxml-xpointer.html#xmlLocationSetPtr)cur,
int val)
Removes an entry from an existing LocationSet list.
| cur: | the initial range set | | val: | the index to remove |
[xmlXPathObjectPtr](libxml-xpath.html#xmlXPathObjectPtr)xmlXPtrNewCollapsedRange ([xmlNodePtr](libxml-tree.html#xmlNodePtr)start)
Create a new xmlXPathObjectPtr of type range using a single nodes
| start: | the starting and ending node | | Returns: | the newly created object. |
[xmlXPathContextPtr](libxml-xpath.html#xmlXPathContextPtr)xmlXPtrNewContext ([xmlDocPtr](libxml-tree.html#xmlDocPtr)doc,
[xmlNodePtr](libxml-tree.html#xmlNodePtr)here,
[xmlNodePtr](libxml-tree.html#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](libxml-xpath.html#xmlXPathObjectPtr)xmlXPtrNewLocationSetNodeSet ([xmlNodeSetPtr](libxml-xpath.html#xmlNodeSetPtr)set)
Create a new xmlXPathObjectPtr of type LocationSet and initialize it with all the nodes from @set
| set: | a node set | | Returns: | the newly created object. |
[xmlXPathObjectPtr](libxml-xpath.html#xmlXPathObjectPtr)xmlXPtrNewLocationSetNodes ([xmlNodePtr](libxml-tree.html#xmlNodePtr)start,
[xmlNodePtr](libxml-tree.html#xmlNodePtr)end)
Create a new xmlXPathObjectPtr of type LocationSet and initialize it with the single range made of the two nodes @start and @end
| start: | the start NodePtr value | | end: | the end NodePtr value or NULL | | Returns: | the newly created object. |
[xmlXPathObjectPtr](libxml-xpath.html#xmlXPathObjectPtr)xmlXPtrNewRange ([xmlNodePtr](libxml-tree.html#xmlNodePtr)start,
int startindex,
[xmlNodePtr](libxml-tree.html#xmlNodePtr)end,
int endindex)
Create a new xmlXPathObjectPtr of type range
| start: | the starting node | | startindex: | the start index | | end: | the ending point | | endindex: | the ending index | | Returns: | the newly created object. |
[xmlXPathObjectPtr](libxml-xpath.html#xmlXPathObjectPtr)xmlXPtrNewRangeNodeObject ([xmlNodePtr](libxml-tree.html#xmlNodePtr)start,
[xmlXPathObjectPtr](libxml-xpath.html#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. |
[xmlXPathObjectPtr](libxml-xpath.html#xmlXPathObjectPtr)xmlXPtrNewRangeNodePoint ([xmlNodePtr](libxml-tree.html#xmlNodePtr)start,
[xmlXPathObjectPtr](libxml-xpath.html#xmlXPathObjectPtr)end)
Create a new xmlXPathObjectPtr of type range from a node to a point
| start: | the starting node | | end: | the ending point | | Returns: | the newly created object. |
[xmlXPathObjectPtr](libxml-xpath.html#xmlXPathObjectPtr)xmlXPtrNewRangeNodes ([xmlNodePtr](libxml-tree.html#xmlNodePtr)start,
[xmlNodePtr](libxml-tree.html#xmlNodePtr)end)
Create a new xmlXPathObjectPtr of type range using 2 nodes
| start: | the starting node | | end: | the ending node | | Returns: | the newly created object. |
[xmlXPathObjectPtr](libxml-xpath.html#xmlXPathObjectPtr)xmlXPtrNewRangePointNode ([xmlXPathObjectPtr](libxml-xpath.html#xmlXPathObjectPtr)start,
[xmlNodePtr](libxml-tree.html#xmlNodePtr)end)
Create a new xmlXPathObjectPtr of type range from a point to a node
| start: | the starting point | | end: | the ending node | | Returns: | the newly created object. |
[xmlXPathObjectPtr](libxml-xpath.html#xmlXPathObjectPtr)xmlXPtrNewRangePoints ([xmlXPathObjectPtr](libxml-xpath.html#xmlXPathObjectPtr)start,
[xmlXPathObjectPtr](libxml-xpath.html#xmlXPathObjectPtr)end)
Create a new xmlXPathObjectPtr of type range using 2 Points
| start: | the starting point | | end: | the ending point | | Returns: | the newly created object. |
void xmlXPtrRangeToFunction ([xmlXPathParserContextPtr](libxml-xpath.html#xmlXPathParserContextPtr)ctxt,
int nargs)
Implement the range-to() XPointer function
| ctxt: | the XPointer Parser context | | nargs: | the number of args |
[xmlXPathObjectPtr](libxml-xpath.html#xmlXPathObjectPtr)xmlXPtrWrapLocationSet ([xmlLocationSetPtr](libxml-xpointer.html#xmlLocationSetPtr)val)
Wrap the LocationSet @val in a new xmlXPathObjectPtr
| val: | the LocationSet value | | Returns: | the newly created object. |
|
|
|
|
|