xpointer.h

00001 /*
00002 
00003  * Summary: API to handle XML Pointers
00004 
00005  * Description: API to handle XML Pointers
00006 
00007  * Base implementation was made accordingly to
00008 
00009  * W3C Candidate Recommendation 7 June 2000
00010 
00011  * http://www.w3.org/TR/2000/CR-xptr-20000607
00012 
00013  *
00014 
00015  * Added support for the element() scheme described in:
00016 
00017  * W3C Proposed Recommendation 13 November 2002
00018 
00019  * http://www.w3.org/TR/2002/PR-xptr-element-20021113/  
00020 
00021  *
00022 
00023  * Copy: See Copyright for the status of this software.
00024 
00025  *
00026 
00027  * Author: Daniel Veillard
00028 
00029  */
00030 
00031 
00032 
00033 #ifndef __XML_XPTR_H__
00034 
00035 #define __XML_XPTR_H__
00036 
00037 
00038 
00039 #include <libxml/xmlversion.h>
00040 
00041 
00042 
00043 #ifdef LIBXML_XPTR_ENABLED
00044 
00045 
00046 
00047 #include <libxml/tree.h>
00048 
00049 #include <libxml/xpath.h>
00050 
00051 
00052 
00053 #ifdef __cplusplus
00054 
00055 extern "C" {
00056 
00057 #endif
00058 
00059 
00060 
00061 /*
00062 
00063  * A Location Set
00064 
00065  */
00066 
00067 typedef struct _xmlLocationSet xmlLocationSet;
00068 
00069 typedef xmlLocationSet *xmlLocationSetPtr;
00070 
00071 struct _xmlLocationSet {
00072 
00073     int locNr;                /* number of locations in the set */
00074 
00075     int locMax;               /* size of the array as allocated */
00076 
00077     xmlXPathObjectPtr *locTab;/* array of locations */
00078 
00079 };
00080 
00081 
00082 
00083 /*
00084 
00085  * Handling of location sets.
00086 
00087  */
00088 
00089 
00090 
00091 XMLPUBFUN xmlLocationSetPtr XMLCALL                     
00092 
00093                     xmlXPtrLocationSetCreate    (xmlXPathObjectPtr val);
00094 
00095 XMLPUBFUN void XMLCALL                  
00096 
00097                     xmlXPtrFreeLocationSet      (xmlLocationSetPtr obj);
00098 
00099 XMLPUBFUN xmlLocationSetPtr XMLCALL     
00100 
00101                     xmlXPtrLocationSetMerge     (xmlLocationSetPtr val1,
00102 
00103                                                  xmlLocationSetPtr val2);
00104 
00105 XMLPUBFUN xmlXPathObjectPtr XMLCALL     
00106 
00107                     xmlXPtrNewRange             (xmlNodePtr start,
00108 
00109                                                  int startindex,
00110 
00111                                                  xmlNodePtr end,
00112 
00113                                                  int endindex);
00114 
00115 XMLPUBFUN xmlXPathObjectPtr XMLCALL     
00116 
00117                     xmlXPtrNewRangePoints       (xmlXPathObjectPtr start,
00118 
00119                                                  xmlXPathObjectPtr end);
00120 
00121 XMLPUBFUN xmlXPathObjectPtr XMLCALL     
00122 
00123                     xmlXPtrNewRangeNodePoint    (xmlNodePtr start,
00124 
00125                                                  xmlXPathObjectPtr end);
00126 
00127 XMLPUBFUN xmlXPathObjectPtr XMLCALL     
00128 
00129                     xmlXPtrNewRangePointNode    (xmlXPathObjectPtr start,
00130 
00131                                                  xmlNodePtr end);
00132 
00133 XMLPUBFUN xmlXPathObjectPtr XMLCALL                     
00134 
00135                     xmlXPtrNewRangeNodes        (xmlNodePtr start,
00136 
00137                                                  xmlNodePtr end);
00138 
00139 XMLPUBFUN xmlXPathObjectPtr XMLCALL     
00140 
00141                     xmlXPtrNewLocationSetNodes  (xmlNodePtr start,
00142 
00143                                                  xmlNodePtr end);
00144 
00145 XMLPUBFUN xmlXPathObjectPtr XMLCALL     
00146 
00147                     xmlXPtrNewLocationSetNodeSet(xmlNodeSetPtr set);
00148 
00149 XMLPUBFUN xmlXPathObjectPtr XMLCALL     
00150 
00151                     xmlXPtrNewRangeNodeObject   (xmlNodePtr start,
00152 
00153                                                  xmlXPathObjectPtr end);
00154 
00155 XMLPUBFUN xmlXPathObjectPtr XMLCALL     
00156 
00157                     xmlXPtrNewCollapsedRange    (xmlNodePtr start);
00158 
00159 XMLPUBFUN void XMLCALL                  
00160 
00161                     xmlXPtrLocationSetAdd       (xmlLocationSetPtr cur,
00162 
00163                                                  xmlXPathObjectPtr val);
00164 
00165 XMLPUBFUN xmlXPathObjectPtr XMLCALL     
00166 
00167                     xmlXPtrWrapLocationSet      (xmlLocationSetPtr val);
00168 
00169 XMLPUBFUN void XMLCALL                  
00170 
00171                     xmlXPtrLocationSetDel       (xmlLocationSetPtr cur,
00172 
00173                                                  xmlXPathObjectPtr val);
00174 
00175 XMLPUBFUN void XMLCALL                  
00176 
00177                     xmlXPtrLocationSetRemove    (xmlLocationSetPtr cur,
00178 
00179                                                  int val);
00180 
00181 
00182 
00183 /*
00184 
00185  * Functions.
00186 
00187  */
00188 
00189 XMLPUBFUN xmlXPathContextPtr XMLCALL    
00190 
00191                     xmlXPtrNewContext           (xmlDocPtr doc,
00192 
00193                                                  xmlNodePtr here,
00194 
00195                                                  xmlNodePtr origin);
00196 
00197 XMLPUBFUN xmlXPathObjectPtr XMLCALL     
00198 
00199                     xmlXPtrEval                 (const xmlChar *str,
00200 
00201                                                  xmlXPathContextPtr ctx);
00202 
00203 XMLPUBFUN void XMLCALL                                      
00204 
00205                     xmlXPtrRangeToFunction      (xmlXPathParserContextPtr ctxt,
00206 
00207                                                  int nargs);
00208 
00209 XMLPUBFUN xmlNodePtr XMLCALL            
00210 
00211                     xmlXPtrBuildNodeList        (xmlXPathObjectPtr obj);
00212 
00213 XMLPUBFUN void XMLCALL          
00214 
00215                     xmlXPtrEvalRangePredicate   (xmlXPathParserContextPtr ctxt);
00216 
00217 #ifdef __cplusplus
00218 
00219 }
00220 
00221 #endif
00222 
00223 
00224 
00225 #endif /* LIBXML_XPTR_ENABLED */
00226 
00227 #endif /* __XML_XPTR_H__ */
00228 

Generated on Wed Jul 26 13:30:47 2006 for XSB by  doxygen 1.4.5