Eneboo - Documentación para desarrolladores
|
00001 /* 00002 * Summary: API to handle XML Pointers 00003 * Description: API to handle XML Pointers 00004 * Base implementation was made accordingly to 00005 * W3C Candidate Recommendation 7 June 2000 00006 * http://www.w3.org/TR/2000/CR-xptr-20000607 00007 * 00008 * Added support for the element() scheme described in: 00009 * W3C Proposed Recommendation 13 November 2002 00010 * http://www.w3.org/TR/2002/PR-xptr-element-20021113/ 00011 * 00012 * Copy: See Copyright for the status of this software. 00013 * 00014 * Author: Daniel Veillard 00015 */ 00016 00017 #ifndef __XML_XPTR_H__ 00018 #define __XML_XPTR_H__ 00019 00020 #include <libxml/xmlversion.h> 00021 00022 #ifdef LIBXML_XPTR_ENABLED 00023 00024 #include <libxml/tree.h> 00025 #include <libxml/xpath.h> 00026 00027 #ifdef __cplusplus 00028 extern "C" { 00029 #endif 00030 00031 /* 00032 * A Location Set 00033 */ 00034 typedef struct _xmlLocationSet xmlLocationSet; 00035 typedef xmlLocationSet *xmlLocationSetPtr; 00036 struct _xmlLocationSet { 00037 int locNr; /* number of locations in the set */ 00038 int locMax; /* size of the array as allocated */ 00039 xmlXPathObjectPtr *locTab;/* array of locations */ 00040 }; 00041 00042 /* 00043 * Handling of location sets. 00044 */ 00045 00046 XMLPUBFUN xmlLocationSetPtr XMLCALL 00047 xmlXPtrLocationSetCreate (xmlXPathObjectPtr val); 00048 XMLPUBFUN void XMLCALL 00049 xmlXPtrFreeLocationSet (xmlLocationSetPtr obj); 00050 XMLPUBFUN xmlLocationSetPtr XMLCALL 00051 xmlXPtrLocationSetMerge (xmlLocationSetPtr val1, 00052 xmlLocationSetPtr val2); 00053 XMLPUBFUN xmlXPathObjectPtr XMLCALL 00054 xmlXPtrNewRange (xmlNodePtr start, 00055 int startindex, 00056 xmlNodePtr end, 00057 int endindex); 00058 XMLPUBFUN xmlXPathObjectPtr XMLCALL 00059 xmlXPtrNewRangePoints (xmlXPathObjectPtr start, 00060 xmlXPathObjectPtr end); 00061 XMLPUBFUN xmlXPathObjectPtr XMLCALL 00062 xmlXPtrNewRangeNodePoint (xmlNodePtr start, 00063 xmlXPathObjectPtr end); 00064 XMLPUBFUN xmlXPathObjectPtr XMLCALL 00065 xmlXPtrNewRangePointNode (xmlXPathObjectPtr start, 00066 xmlNodePtr end); 00067 XMLPUBFUN xmlXPathObjectPtr XMLCALL 00068 xmlXPtrNewRangeNodes (xmlNodePtr start, 00069 xmlNodePtr end); 00070 XMLPUBFUN xmlXPathObjectPtr XMLCALL 00071 xmlXPtrNewLocationSetNodes (xmlNodePtr start, 00072 xmlNodePtr end); 00073 XMLPUBFUN xmlXPathObjectPtr XMLCALL 00074 xmlXPtrNewLocationSetNodeSet(xmlNodeSetPtr set); 00075 XMLPUBFUN xmlXPathObjectPtr XMLCALL 00076 xmlXPtrNewRangeNodeObject (xmlNodePtr start, 00077 xmlXPathObjectPtr end); 00078 XMLPUBFUN xmlXPathObjectPtr XMLCALL 00079 xmlXPtrNewCollapsedRange (xmlNodePtr start); 00080 XMLPUBFUN void XMLCALL 00081 xmlXPtrLocationSetAdd (xmlLocationSetPtr cur, 00082 xmlXPathObjectPtr val); 00083 XMLPUBFUN xmlXPathObjectPtr XMLCALL 00084 xmlXPtrWrapLocationSet (xmlLocationSetPtr val); 00085 XMLPUBFUN void XMLCALL 00086 xmlXPtrLocationSetDel (xmlLocationSetPtr cur, 00087 xmlXPathObjectPtr val); 00088 XMLPUBFUN void XMLCALL 00089 xmlXPtrLocationSetRemove (xmlLocationSetPtr cur, 00090 int val); 00091 00092 /* 00093 * Functions. 00094 */ 00095 XMLPUBFUN xmlXPathContextPtr XMLCALL 00096 xmlXPtrNewContext (xmlDocPtr doc, 00097 xmlNodePtr here, 00098 xmlNodePtr origin); 00099 XMLPUBFUN xmlXPathObjectPtr XMLCALL 00100 xmlXPtrEval (const xmlChar *str, 00101 xmlXPathContextPtr ctx); 00102 XMLPUBFUN void XMLCALL 00103 xmlXPtrRangeToFunction (xmlXPathParserContextPtr ctxt, 00104 int nargs); 00105 XMLPUBFUN xmlNodePtr XMLCALL 00106 xmlXPtrBuildNodeList (xmlXPathObjectPtr obj); 00107 XMLPUBFUN void XMLCALL 00108 xmlXPtrEvalRangePredicate (xmlXPathParserContextPtr ctxt); 00109 #ifdef __cplusplus 00110 } 00111 #endif 00112 00113 #endif /* LIBXML_XPTR_ENABLED */ 00114 #endif /* __XML_XPTR_H__ */