Daniel Veillard | e8eac3d | 2000-10-11 08:55:02 +0000 | [diff] [blame] | 1 | /* |
| 2 | * xpointer.h : API to handle XML Pointers |
| 3 | * |
| 4 | * World Wide Web Consortium Working Draft 03-March-1998 |
| 5 | * http://www.w3.org/TR/1998/WD-xptr-19980303 |
| 6 | * |
| 7 | * See Copyright for the status of this software. |
| 8 | * |
| 9 | * Daniel.Veillard@w3.org |
| 10 | */ |
| 11 | |
| 12 | #ifndef __XML_XPTR_H__ |
| 13 | #define __XML_XPTR_H__ |
| 14 | |
| 15 | #include <libxml/tree.h> |
| 16 | #include <libxml/xpath.h> |
| 17 | |
| 18 | #ifdef __cplusplus |
| 19 | extern "C" { |
| 20 | #endif |
| 21 | |
| 22 | /* |
| 23 | * A Location Set |
| 24 | */ |
| 25 | typedef struct _xmlLocationSet xmlLocationSet; |
| 26 | typedef xmlLocationSet *xmlLocationSetPtr; |
| 27 | struct _xmlLocationSet { |
| 28 | int locNr; /* number of locations in the set */ |
| 29 | int locMax; /* size of the array as allocated */ |
| 30 | xmlXPathObjectPtr *locTab;/* array of locations */ |
| 31 | }; |
| 32 | |
| 33 | /* |
Daniel Veillard | 2d38f04 | 2000-10-11 10:54:10 +0000 | [diff] [blame] | 34 | * Handling of location sets |
| 35 | */ |
| 36 | |
| 37 | void xmlXPtrFreeLocationSet (xmlLocationSetPtr obj); |
| 38 | xmlLocationSetPtr xmlXPtrLocationSetMerge (xmlLocationSetPtr val1, |
| 39 | xmlLocationSetPtr val2); |
| 40 | |
| 41 | /* |
Daniel Veillard | e8eac3d | 2000-10-11 08:55:02 +0000 | [diff] [blame] | 42 | * Functions |
| 43 | */ |
| 44 | xmlXPathContextPtr xmlXPtrNewContext (xmlDocPtr doc, |
| 45 | xmlNodePtr here, |
| 46 | xmlNodePtr origin); |
| 47 | xmlXPathObjectPtr xmlXPtrEval (const xmlChar *str, |
| 48 | xmlXPathContextPtr ctx); |
| 49 | void xmlXPtrRangeToFunction (xmlXPathParserContextPtr ctxt, |
| 50 | int nargs); |
Daniel Veillard | c2def84 | 2000-11-07 14:21:01 +0000 | [diff] [blame] | 51 | xmlNodePtr xmlXPtrBuildNodeList (xmlXPathObjectPtr obj); |
Daniel Veillard | e8eac3d | 2000-10-11 08:55:02 +0000 | [diff] [blame] | 52 | |
| 53 | #ifdef __cplusplus |
| 54 | } |
| 55 | #endif |
| 56 | #endif /* __XML_XPTR_H__ */ |