加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
xpath.c 96.92 KB
一键复制 编辑 原始数据 按行查看 历史
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948
/*
* xpath.c: XML Path Language implementation
* XPath is a language for addressing parts of an XML document,
* designed to be used by both XSLT and XPointer
*
* Reference: W3C Recommendation 16 November 1999
* http://www.w3.org/TR/1999/REC-xpath-19991116
* Public reference:
* http://www.w3.org/TR/xpath
*
* See Copyright for the status of this software
*
* Author: daniel@veillard.com
*
*/
/* To avoid EBCDIC trouble when parsing on zOS */
#if defined(__MVS__)
#pragma convert("ISO8859-1")
#endif
#define IN_LIBXML
#include "libxml.h"
#include <limits.h>
#include <string.h>
#include <stddef.h>
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_MATH_H
#include <math.h>
#endif
#ifdef HAVE_FLOAT_H
#include <float.h>
#endif
#ifdef HAVE_CTYPE_H
#include <ctype.h>
#endif
#ifdef HAVE_SIGNAL_H
#include <signal.h>
#endif
#include <libxml/xmlmemory.h>
#include <libxml/tree.h>
#include <libxml/valid.h>
#include <libxml/xpath.h>
#include <libxml/xpathInternals.h>
#include <libxml/parserInternals.h>
#include <libxml/hash.h>
#ifdef LIBXML_XPTR_ENABLED
#include <libxml/xpointer.h>
#endif
#ifdef LIBXML_DEBUG_ENABLED
#include <libxml/debugXML.h>
#endif
#include <libxml/xmlerror.h>
#include <libxml/threads.h>
#include <libxml/globals.h>
#ifdef LIBXML_PATTERN_ENABLED
#include <libxml/pattern.h>
#endif
#include "buf.h"
unsigned int xmlParserMaxDepth = 256;
#ifdef LIBXML_PATTERN_ENABLED
#define XPATH_STREAMING
#endif
#define TODO \
xmlGenericError(xmlGenericErrorContext, \
"Unimplemented block at %s:%d\n", \
__FILE__, __LINE__);
/**
* WITH_TIM_SORT:
*
* Use the Timsort algorithm provided in timsort.h to sort
* nodeset as this is a great improvement over the old Shell sort
* used in xmlXPathNodeSetSort()
*/
#define WITH_TIM_SORT
/*
* XP_OPTIMIZED_NON_ELEM_COMPARISON:
* If defined, this will use xmlXPathCmpNodesExt() instead of
* xmlXPathCmpNodes(). The new function is optimized comparison of
* non-element nodes; actually it will speed up comparison only if
* xmlXPathOrderDocElems() was called in order to index the elements of
* a tree in document order; Libxslt does such an indexing, thus it will
* benefit from this optimization.
*/
#define XP_OPTIMIZED_NON_ELEM_COMPARISON
/*
* XP_OPTIMIZED_FILTER_FIRST:
* If defined, this will optimize expressions like "key('foo', 'val')[b][1]"
* in a way, that it stop evaluation at the first node.
*/
#define XP_OPTIMIZED_FILTER_FIRST
/*
* XPATH_MAX_STEPS:
* when compiling an XPath expression we arbitrary limit the maximum
* number of step operation in the compiled expression. 1000000 is
* an insanely large value which should never be reached under normal
* circumstances
*/
#define XPATH_MAX_STEPS 1000000
/*
* XPATH_MAX_STACK_DEPTH:
* when evaluating an XPath expression we arbitrary limit the maximum
* number of object allowed to be pushed on the stack. 1000000 is
* an insanely large value which should never be reached under normal
* circumstances
*/
#define XPATH_MAX_STACK_DEPTH 1000000
/*
* XPATH_MAX_NODESET_LENGTH:
* when evaluating an XPath expression nodesets are created and we
* arbitrary limit the maximum length of those node set. 10000000 is
* an insanely large value which should never be reached under normal
* circumstances, one would first need to construct an in memory tree
* with more than 10 millions nodes.
*/
#define XPATH_MAX_NODESET_LENGTH 10000000
/*
* XPATH_MAX_RECRUSION_DEPTH:
* Maximum amount of nested functions calls when parsing or evaluating
* expressions
*/
#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
#define XPATH_MAX_RECURSION_DEPTH 500
#else
#define XPATH_MAX_RECURSION_DEPTH 5000
#endif
/*
* Wrapper for the Timsort algorithm from timsort.h
*/
#ifdef WITH_TIM_SORT
#define SORT_NAME libxml_domnode
#define SORT_TYPE xmlNodePtr
#ifdef XP_OPTIMIZED_NON_ELEM_COMPARISON
#else
#endif
#include "timsort.h"
#endif /* WITH_TIM_SORT */
#ifdef LIBXML_XPATH_ENABLED
/*
* TODO: when compatibility allows remove all "fake node libxslt" strings
* the test should just be name[0] = ' '
*/
#ifdef DEBUG_XPATH_EXPRESSION
#define DEBUG_STEP
#define DEBUG_EXPR
#define DEBUG_EVAL_COUNTS
#endif
#define STRANGE \
xmlGenericError(xmlGenericErrorContext, \
"Internal error at %s:%d\n", \
__FILE__, __LINE__);
#define XP_HAS_CACHE(c) ((c != NULL) && ((c)->cache != NULL))
#define CUR (*ctxt->cur)
#define SKIP(val) ctxt->cur += (val)
#define NXT(val) ctxt->cur[(val)]
#define CUR_PTR ctxt->cur
#define COPY_BUF(l, b, i, v) \
if (l == 1) \
b[i++] = (xmlChar)v; \
else \
i += xmlCopyChar(l, &b[i], v)
#define NEXTL(l) ctxt->cur += l
#define SKIP_BLANKS \
while (IS_BLANK_CH(*(ctxt->cur))) \
NEXT
#define CURRENT (*ctxt->cur)
#define NEXT ((*ctxt->cur) ? ctxt->cur++ : ctxt->cur)
#ifndef DBL_DIG
#define DBL_DIG 16
#endif
#ifndef DBL_EPSILON
#define DBL_EPSILON 1E-9
#endif
#define UPPER_DOUBLE 1E9
#define LOWER_DOUBLE 1E-5
#define LOWER_DOUBLE_EXP 5
#define INTEGER_DIGITS DBL_DIG
#define FRACTION_DIGITS (DBL_DIG + 1 + (LOWER_DOUBLE_EXP))
#define EXPONENT_DIGITS (3 + 2)
#define XML_NODESET_DEFAULT 10
#define CHECK_CTXT(ctxt) \
if (ctxt == NULL) \
{ \
__xmlRaiseError(NULL, NULL, NULL, \
NULL, NULL, XML_FROM_XPATH, \
XML_ERR_INTERNAL_ERROR, XML_ERR_FATAL, \
__FILE__, __LINE__, \
NULL, NULL, NULL, 0, 0, \
"NULL context pointer\n"); \
return (NULL); \
}
#define CHECK_CTXT_NEG(ctxt) \
if (ctxt == NULL) \
{ \
__xmlRaiseError(NULL, NULL, NULL, \
NULL, NULL, XML_FROM_XPATH, \
XML_ERR_INTERNAL_ERROR, XML_ERR_FATAL, \
__FILE__, __LINE__, \
NULL, NULL, NULL, 0, 0, \
"NULL context pointer\n"); \
return (-1); \
}
#define CHECK_CONTEXT(ctxt) \
if ((ctxt == NULL) || (ctxt->doc == NULL) || \
(ctxt->doc->children == NULL)) \
{ \
xmlXPatherror(ctxt, __FILE__, __LINE__, XPATH_INVALID_CTXT); \
return (NULL); \
}
#define IS_FUNCTION 200
#define MAX_FRAC 20
#endif /*LIBXML_XPATH_ENABLED*/
#ifdef COMPILE_WITH_RUST
extern int xmlXPathContextSetCache_rust(xmlXPathContextPtr ctxt, int active, int value, int options);
extern xmlXPathObjectPtr valuePop_rust(xmlXPathParserContextPtr ctxt);
extern int valuePush_rust(xmlXPathParserContextPtr ctxt, xmlXPathObjectPtr value);
extern int xmlXPathPopBoolean_rust(xmlXPathParserContextPtr ctxt);
extern double xmlXPathPopNumber_rust(xmlXPathParserContextPtr ctxt);
extern xmlChar *xmlXPathPopString_rust(xmlXPathParserContextPtr ctxt);
extern void *xmlXPathPopExternal_rust(xmlXPathParserContextPtr ctxt);
extern long xmlXPathOrderDocElems_rust(xmlDocPtr doc);
extern int xmlXPathCmpNodes_rust(xmlNodePtr node1, xmlNodePtr node2);
extern void xmlXPathNodeSetSort_rust(xmlNodeSetPtr set);
extern void xmlXPathNodeSetFreeNs_rust(xmlNsPtr ns);
extern xmlNodeSetPtr xmlXPathNodeSetCreate_rust(xmlNodePtr val);
extern int xmlXPathNodeSetContains_rust(xmlNodeSetPtr cur, xmlNodePtr val);
extern int xmlXPathNodeSetAddNs_rust(xmlNodeSetPtr cur, xmlNodePtr node, xmlNsPtr ns);
extern int xmlXPathNodeSetAdd_rust(xmlNodeSetPtr cur, xmlNodePtr val);
extern int xmlXPathNodeSetAddUnique_rust(xmlNodeSetPtr cur, xmlNodePtr val);
extern xmlNodeSetPtr xmlXPathNodeSetMerge_rust(xmlNodeSetPtr val1, xmlNodeSetPtr val2);
extern void xmlXPathNodeSetDel_rust(xmlNodeSetPtr cur, xmlNodePtr val);
extern void xmlXPathNodeSetRemove_rust(xmlNodeSetPtr cur, int val);
extern void xmlXPathFreeNodeSet_rust(xmlNodeSetPtr obj);
extern xmlXPathObjectPtr xmlXPathNewNodeSetList_rust(xmlNodeSetPtr val);
extern xmlNodeSetPtr xmlXPathDifference_rust(xmlNodeSetPtr nodes1, xmlNodeSetPtr nodes2);
extern xmlNodeSetPtr xmlXPathIntersection_rust(xmlNodeSetPtr nodes1, xmlNodeSetPtr nodes2);
extern xmlNodeSetPtr xmlXPathDistinctSorted_rust(xmlNodeSetPtr nodes);
extern xmlNodeSetPtr xmlXPathDistinct_rust(xmlNodeSetPtr nodes);
extern int xmlXPathHasSameNodes_rust(xmlNodeSetPtr nodes1, xmlNodeSetPtr nodes2);
extern xmlNodeSetPtr xmlXPathNodeLeadingSorted_rust(xmlNodeSetPtr nodes, xmlNodePtr node);
extern xmlNodeSetPtr xmlXPathNodeLeading_rust(xmlNodeSetPtr nodes, xmlNodePtr node);
extern xmlNodeSetPtr xmlXPathLeadingSorted_rust(xmlNodeSetPtr nodes1, xmlNodeSetPtr nodes2);
extern xmlNodeSetPtr xmlXPathLeading_rust(xmlNodeSetPtr nodes1, xmlNodeSetPtr nodes2);
extern xmlNodeSetPtr xmlXPathNodeTrailingSorted_rust(xmlNodeSetPtr nodes, xmlNodePtr node);
extern xmlNodeSetPtr xmlXPathNodeTrailing_rust(xmlNodeSetPtr nodes, xmlNodePtr node);
extern xmlNodeSetPtr xmlXPathTrailingSorted_rust(xmlNodeSetPtr nodes1, xmlNodeSetPtr nodes2);
extern xmlNodeSetPtr xmlXPathTrailing_rust(xmlNodeSetPtr nodes1, xmlNodeSetPtr nodes2);
extern int xmlXPathRegisterFunc_rust(xmlXPathContextPtr ctxt, const xmlChar *name, xmlXPathFunction f);
extern void xmlXPathErr_rust(xmlXPathParserContextPtr ctxt, int error);
extern void xmlXPatherror_rust(xmlXPathParserContextPtr ctxt, const char *file ATTRIBUTE_UNUSED, int line ATTRIBUTE_UNUSED, int no);
extern xmlNodeSetPtr xmlXPathPopNodeSet_rust(xmlXPathParserContextPtr ctxt);
extern void xmlXPathFreeCompExpr_rust(xmlXPathCompExprPtr comp);
extern void xmlXPathDebugDumpObject_rust(FILE *output, xmlXPathObjectPtr cur, int depth);
extern void xmlXPathInit_rust();
extern double xmlXPathCastNodeToNumber_rust(xmlNodePtr node);
extern double xmlXPathCastNodeSetToNumber_rust(xmlNodeSetPtr ns);
extern void xmlXPathModValues_rust(xmlXPathParserContextPtr ctxt);
extern double xmlXPathStringEvalNumber_rust(const xmlChar *str);
extern double xmlXPathCastToNumber_rust(xmlXPathObjectPtr val);
extern int xmlXPathCastToBoolean_rust(xmlXPathObjectPtr val);
extern int xmlXPathIsNaN_rust(double val);
extern int xmlXPathIsInf_rust(double val);
extern xmlNodePtr xmlXPathNextNamespace_rust(xmlXPathParserContextPtr ctxt, xmlNodePtr cur);
extern void xmlXPathDebugDumpCompExpr_rust(FILE *output, xmlXPathCompExprPtr comp, int depth);
extern void xmlXPathRegisterFuncLookup_rust(xmlXPathContextPtr ctxt, xmlXPathFuncLookupFunc f, void *funcCtxt);
extern xmlXPathFunction xmlXPathFunctionLookup_rust(xmlXPathContextPtr ctxt, const xmlChar *name);
extern int xmlXPathRegisterFuncNS_rust(xmlXPathContextPtr ctxt, const xmlChar *name, const xmlChar *ns_uri, xmlXPathFunction f);
extern xmlXPathFunction xmlXPathFunctionLookupNS_rust(xmlXPathContextPtr ctxt, const xmlChar *name, const xmlChar *ns_uri);
extern void xmlXPathRegisteredFuncsCleanup_rust(xmlXPathContextPtr ctxt);
extern int xmlXPathRegisterVariableNS_rust(xmlXPathContextPtr ctxt, const xmlChar *name, const xmlChar *ns_uri, xmlXPathObjectPtr value);
extern void xmlXPathRegisterVariableLookup_rust(xmlXPathContextPtr ctxt, xmlXPathVariableLookupFunc f, void *data);
extern xmlXPathObjectPtr xmlXPathVariableLookup_rust(xmlXPathContextPtr ctxt, const xmlChar *name);
extern xmlXPathObjectPtr xmlXPathVariableLookupNS_rust(xmlXPathContextPtr ctxt, const xmlChar *name, const xmlChar *ns_uri);
extern void xmlXPathRegisteredVariablesCleanup_rust(xmlXPathContextPtr ctxt);
extern int xmlXPathRegisterNs_rust(xmlXPathContextPtr ctxt, const xmlChar *prefix, const xmlChar *ns_uri);
extern const xmlChar * xmlXPathNsLookup_rust(xmlXPathContextPtr ctxt, const xmlChar *prefix);
extern xmlChar * xmlXPathCastNumberToString_rust(double val);
extern void xmlXPathFreeContext_rust(xmlXPathContextPtr ctxt);
extern xmlXPathObjectPtr xmlXPathConvertBoolean_rust(xmlXPathObjectPtr val);
extern void xmlXPathEvalExpr_rust(xmlXPathParserContextPtr ctxt);
extern xmlXPathObjectPtr xmlXPathCompiledEval_rust(xmlXPathCompExprPtr comp, xmlXPathContextPtr ctx);
extern int xmlXPathCompiledEvalToBoolean_rust(xmlXPathCompExprPtr comp, xmlXPathContextPtr ctxt);
extern xmlXPathCompExprPtr xmlXPathCompile_rust(const xmlChar *str);
extern xmlXPathCompExprPtr xmlXPathCtxtCompile_rust(xmlXPathContextPtr ctxt, const xmlChar *str);
extern xmlXPathParserContextPtr xmlXPathNewParserContext_rust(const xmlChar *str, xmlXPathContextPtr ctxt);
extern xmlXPathObjectPtr xmlXPathNodeEval_rust(xmlNodePtr node, const xmlChar *str, xmlXPathContextPtr ctx);
extern int xmlXPathSetContextNode_rust(xmlNodePtr node, xmlXPathContextPtr ctx);
extern int xmlXPathEvalPredicate_rust(xmlXPathContextPtr ctxt, xmlXPathObjectPtr res);
extern int xmlXPathEvaluatePredicateResult_rust(xmlXPathParserContextPtr ctxt, xmlXPathObjectPtr res);
extern int xmlXPathIsNodeType_rust(const xmlChar *name);
extern xmlChar *xmlXPathParseNCName_rust(xmlXPathParserContextPtr ctxt);
extern xmlChar *xmlXPathParseName_rust(xmlXPathParserContextPtr ctxt);
extern void xmlXPathRoundFunction_rust(xmlXPathParserContextPtr ctxt, int nargs);
extern void xmlXPathFloorFunction_rust(xmlXPathParserContextPtr ctxt, int nargs);
extern void xmlXPathCeilingFunction_rust(xmlXPathParserContextPtr ctxt, int nargs);
extern void xmlXPathSumFunction_rust(xmlXPathParserContextPtr ctxt, int nargs);
extern xmlNodePtr xmlXPathNextAncestor_rust(xmlXPathParserContextPtr ctxt, xmlNodePtr cur);
extern xmlNodePtr xmlXPathNextAncestorOrSelf_rust(xmlXPathParserContextPtr ctxt, xmlNodePtr cur);
extern xmlNodePtr xmlXPathNextFollowingSibling_rust(xmlXPathParserContextPtr ctxt, xmlNodePtr cur);
extern xmlNodePtr xmlXPathNextPrecedingSibling_rust(xmlXPathParserContextPtr ctxt, xmlNodePtr cur);
extern xmlNodePtr xmlXPathNextFollowing_rust(xmlXPathParserContextPtr ctxt, xmlNodePtr cur);
extern xmlNodePtr xmlXPathNextPreceding_rust(xmlXPathParserContextPtr ctxt, xmlNodePtr cur);
extern xmlNodePtr xmlXPathNextAttribute_rust(xmlXPathParserContextPtr ctxt, xmlNodePtr cur);
extern void xmlXPathRoot_rust(xmlXPathParserContextPtr ctxt);
extern void xmlXPathCountFunction_rust(xmlXPathParserContextPtr ctxt, int nargs);
extern void xmlXPathIdFunction_rust(xmlXPathParserContextPtr ctxt, int nargs);
extern void xmlXPathLocalNameFunction_rust(xmlXPathParserContextPtr ctxt, int nargs);
extern void xmlXPathNamespaceURIFunction_rust(xmlXPathParserContextPtr ctxt, int nargs);
extern void xmlXPathStringFunction_rust(xmlXPathParserContextPtr ctxt, int nargs);
extern void xmlXPathStringLengthFunction_rust(xmlXPathParserContextPtr ctxt, int nargs);
extern void xmlXPathConcatFunction_rust(xmlXPathParserContextPtr ctxt, int nargs);
extern void xmlXPathContainsFunction_rust(xmlXPathParserContextPtr ctxt, int nargs);
extern void xmlXPathStartsWithFunction_rust(xmlXPathParserContextPtr ctxt, int nargs);
extern void xmlXPathSubstringFunction_rust(xmlXPathParserContextPtr ctxt, int nargs);
extern void xmlXPathSubstringBeforeFunction_rust(xmlXPathParserContextPtr ctxt, int nargs);
extern void xmlXPathSubstringAfterFunction_rust(xmlXPathParserContextPtr ctxt, int nargs);
extern void xmlXPathNormalizeFunction_rust(xmlXPathParserContextPtr ctxt, int nargs);
extern void xmlXPathTranslateFunction_rust(xmlXPathParserContextPtr ctxt, int nargs);
extern void xmlXPathBooleanFunction_rust(xmlXPathParserContextPtr ctxt, int nargs);
extern void xmlXPathNotFunction_rust(xmlXPathParserContextPtr ctxt, int nargs);
extern void xmlXPathTrueFunction_rust(xmlXPathParserContextPtr ctxt, int nargs);
extern void xmlXPathFalseFunction_rust(xmlXPathParserContextPtr ctxt, int nargs);
extern void xmlXPathLangFunction_rust(xmlXPathParserContextPtr ctxt, int nargs);
extern void xmlXPathNumberFunction_rust(xmlXPathParserContextPtr ctxt, int nargs);
extern xmlXPathObjectPtr xmlXPathEval_rust(const xmlChar *str, xmlXPathContextPtr ctx);
extern xmlXPathObjectPtr xmlXPathEvalExpression_rust(const xmlChar *str, xmlXPathContextPtr ctxt);
extern void xmlXPathRegisterAllFunctions_rust(xmlXPathContextPtr ctxt);
extern xmlNodePtr xmlXPathNextDescendantOrSelf_rust(xmlXPathParserContextPtr ctxt, xmlNodePtr cur);
extern xmlNodePtr xmlXPathNextDescendant_rust(xmlXPathParserContextPtr ctxt, xmlNodePtr cur);
extern xmlChar * xmlXPathCastToString_rust(xmlXPathObjectPtr val);
extern xmlXPathObjectPtr xmlXPathConvertString_rust(xmlXPathObjectPtr val);
extern xmlXPathContextPtr xmlXPathNewContext_rust(xmlDocPtr doc);
extern void xmlXPathFreeParserContext_rust(xmlXPathParserContextPtr ctxt);
extern int xmlXPathEqualValues_rust(xmlXPathParserContextPtr ctxt);
extern int xmlXPathNotEqualValues_rust(xmlXPathParserContextPtr ctxt);
extern xmlNodePtr xmlXPathNextChild_rust(xmlXPathParserContextPtr ctxt, xmlNodePtr cur);
extern xmlNodePtr xmlXPathNextParent_rust(xmlXPathParserContextPtr ctxt, xmlNodePtr cur);
extern void xmlXPathLastFunction_rust(xmlXPathParserContextPtr ctxt, int nargs);
extern void xmlXPathPositionFunction_rust(xmlXPathParserContextPtr ctxt, int nargs);
extern int xmlXPathCompareValues_rust(xmlXPathParserContextPtr ctxt, int inf, int strict);
extern void xmlXPathAddValues_rust(xmlXPathParserContextPtr ctxt);
extern void xmlXPathSubValues_rust(xmlXPathParserContextPtr ctxt);
extern void xmlXPathModValues_rust(xmlXPathParserContextPtr ctxt);
extern void xmlXPathDivValues_rust(xmlXPathParserContextPtr ctxt);
extern void xmlXPathMultValues_rust(xmlXPathParserContextPtr ctxt);
extern void xmlXPathValueFlipSign_rust(xmlXPathParserContextPtr ctxt);
extern xmlNodePtr xmlXPathNextSelf_rust(xmlXPathParserContextPtr ctxt, xmlNodePtr cur);
extern int xmlXPathCastNodeSetToBoolean_rust(xmlNodeSetPtr ns);
extern int xmlXPathCastStringToBoolean_rust(const xmlChar *val);
extern int xmlXPathCastNumberToBoolean_rust(double val);
extern xmlXPathObjectPtr xmlXPathConvertNumber_rust(xmlXPathObjectPtr val);
extern xmlChar * xmlXPathCastNodeToString_rust(xmlNodePtr node);
extern xmlChar * xmlXPathCastBooleanToString_rust(int val);
extern void xmlXPathRegisteredNsCleanup_rust(xmlXPathContextPtr ctxt);
extern void xmlXPathFreeObject_rust(xmlXPathObjectPtr obj);
extern xmlXPathObjectPtr xmlXPathNewFloat_rust(double val);
extern xmlXPathObjectPtr xmlXPathNewBoolean_rust(int val);
extern xmlXPathObjectPtr xmlXPathNewString_rust(const xmlChar *val);
extern xmlXPathObjectPtr xmlXPathWrapString_rust(xmlChar *val);
extern xmlXPathObjectPtr xmlXPathNewCString_rust(const char *val);
extern double xmlXPathCastStringToNumber_rust(const xmlChar *val);
extern double xmlXPathCastBooleanToNumber_rust(int val);
extern xmlChar * xmlXPathCastNodeSetToString_rust(xmlNodeSetPtr ns);
extern xmlXPathObjectPtr xmlXPathWrapCString_rust(char *val);
extern void xmlXPathFreeNodeSetList_rust(xmlXPathObjectPtr obj);
extern xmlXPathObjectPtr xmlXPathWrapNodeSet_rust(xmlNodeSetPtr val);
extern xmlXPathObjectPtr xmlXPathNewValueTree_rust(xmlNodePtr val);
extern xmlXPathObjectPtr xmlXPathNewNodeSet_rust(xmlNodePtr val);
extern xmlXPathObjectPtr xmlXPathObjectCopy_rust(xmlXPathObjectPtr val);
extern xmlXPathObjectPtr xmlXPathWrapExternal_rust(void *val);
extern void xmlGenericErrorContextNodeSet_rust(FILE *output, xmlNodeSetPtr obj);
extern int xmlXPathRegisterVariable_rust(xmlXPathContextPtr ctxt, const xmlChar *name, xmlXPathObjectPtr value);
#if defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
/************************************************************************
* *
* Floating point stuff *
* *
************************************************************************/
double xmlXPathNAN;
double xmlXPathPINF;
double xmlXPathNINF;
/**
* xmlXPathInit:
*
* Initialize the XPath environment
*/
ATTRIBUTE_NO_SANITIZE("float-divide-by-zero")
void xmlXPathInit(void)
{
/* MSVC doesn't allow division by zero in constant expressions. */
double zero = 0.0;
xmlXPathNAN = 0.0 / zero;
xmlXPathPINF = 1.0 / zero;
xmlXPathNINF = -xmlXPathPINF;
xmlXPathInit_rust();
}
/**
* xmlXPathIsNaN:
* @val: a double value
*
* Returns 1 if the value is a NaN, 0 otherwise
*/
int xmlXPathIsNaN(double val)
{
return xmlXPathIsNaN_rust(val);
}
/**
* xmlXPathIsInf:
* @val: a double value
*
* Returns 1 if the value is +Infinite, -1 if -Infinite, 0 otherwise
*/
int xmlXPathIsInf(double val)
{
return xmlXPathIsInf_rust(val);
}
#endif /* SCHEMAS or XPATH */
#ifdef LIBXML_XPATH_ENABLED
/**__xmlRaiseError
* xmlXPathErr:
* @ctxt: a XPath parser context
* @error: the error code
*
* Handle an XPath error
*/
void xmlXPathErr(xmlXPathParserContextPtr ctxt, int error)
{
xmlXPathErr_rust(ctxt, error);
}
/**
* xmlXPatherror:
* @ctxt: the XPath Parser context
* @file: the file name
* @line: the line number
* @no: the error number
*
* Formats an error message.
*/
void xmlXPatherror(xmlXPathParserContextPtr ctxt, const char *file ATTRIBUTE_UNUSED,
int line ATTRIBUTE_UNUSED, int no)
{
xmlXPatherror_rust(ctxt, file, line, no);
}
/**
* xmlXPathFreeCompExpr:
* @comp: an XPATH comp
*
* Free up the memory allocated by @comp
*/
void xmlXPathFreeCompExpr(xmlXPathCompExprPtr comp)
{
xmlXPathFreeCompExpr_rust(comp);
}
#ifdef LIBXML_DEBUG_ENABLED
void xmlXPathDebugDumpObject(FILE *output, xmlXPathObjectPtr cur, int depth)
{
xmlXPathDebugDumpObject_rust(output, cur, depth);
}
/**
* xmlXPathDebugDumpCompExpr:
* @output: the FILE * for the output
* @comp: the precompiled XPath expression
* @depth: the indentation level.
*
* Dumps the tree of the compiled XPath expression.
*/
void xmlXPathDebugDumpCompExpr(FILE *output, xmlXPathCompExprPtr comp,
int depth)
{
xmlXPathDebugDumpCompExpr_rust(output, comp, depth);
}
#endif /* LIBXML_DEBUG_ENABLED */
int xmlXPathContextSetCache(xmlXPathContextPtr ctxt,
int active,
int value,
int options)
{
return xmlXPathContextSetCache_rust(ctxt, active, value, options);
}
/**
* valuePop:
* @ctxt: an XPath evaluation context
*
* Pops the top XPath object from the value stack
*
* Returns the XPath object just removed
*/
xmlXPathObjectPtr
valuePop(xmlXPathParserContextPtr ctxt)
{
return valuePop_rust(ctxt);
}
/**
* valuePush:
* @ctxt: an XPath evaluation context
* @value: the XPath object
*
* Pushes a new XPath object on top of the value stack. If value is NULL,
* a memory error is recorded in the parser context.
*
* Returns the number of items on the value stack, or -1 in case of error.
*/
int valuePush(xmlXPathParserContextPtr ctxt, xmlXPathObjectPtr value)
{
return valuePush_rust(ctxt, value);
}
/**
* xmlXPathPopBoolean:
* @ctxt: an XPath parser context
*
* Pops a boolean from the stack, handling conversion if needed.
* Check error with #xmlXPathCheckError.
*
* Returns the boolean
*/
int xmlXPathPopBoolean(xmlXPathParserContextPtr ctxt)
{
return xmlXPathPopBoolean_rust(ctxt);
}
/**
* xmlXPathPopNumber:
* @ctxt: an XPath parser context
*
* Pops a number from the stack, handling conversion if needed.
* Check error with #xmlXPathCheckError.
*
* Returns the number
*/
double
xmlXPathPopNumber(xmlXPathParserContextPtr ctxt)
{
return xmlXPathPopNumber_rust(ctxt);
}
/**
* xmlXPathPopString:
* @ctxt: an XPath parser context
*
* Pops a string from the stack, handling conversion if needed.
* Check error with #xmlXPathCheckError.
*
* Returns the string
*/
xmlChar *
xmlXPathPopString(xmlXPathParserContextPtr ctxt)
{
return xmlXPathPopString_rust(ctxt);
}
/**
* xmlXPathPopNodeSet:
* @ctxt: an XPath parser context
*
* Pops a node-set from the stack, handling conversion if needed.
* Check error with #xmlXPathCheckError.
*
* Returns the node-set
*/
xmlNodeSetPtr
xmlXPathPopNodeSet(xmlXPathParserContextPtr ctxt)
{
return xmlXPathPopNodeSet_rust(ctxt);
}
/**
* xmlXPathPopExternal:
* @ctxt: an XPath parser context
*
* Pops an external object from the stack, handling conversion if needed.
* Check error with #xmlXPathCheckError.
*
* Returns the object
*/
void *
xmlXPathPopExternal(xmlXPathParserContextPtr ctxt)
{
return xmlXPathPopExternal_rust(ctxt);
}
/*
* Macros for accessing the content. Those should be used only by the parser,
* and not exported.
*
* Dirty macros, i.e. one need to make assumption on the context to use them
*
* CUR_PTR return the current pointer to the xmlChar to be parsed.
* CUR returns the current xmlChar value, i.e. a 8 bit value
* in ISO-Latin or UTF-8.
* This should be used internally by the parser
* only to compare to ASCII values otherwise it would break when
* running with UTF-8 encoding.
* NXT(n) returns the n'th next xmlChar. Same as CUR is should be used only
* to compare on ASCII based substring.
* SKIP(n) Skip n xmlChar, and must also be used only to skip ASCII defined
* strings within the parser.
* CURRENT Returns the current char value, with the full decoding of
* UTF-8 if we are using this mode. It returns an int.
* NEXT Skip to the next character, this does the proper decoding
* in UTF-8 mode. It also pop-up unfinished entities on the fly.
* It returns the pointer to the current xmlChar.
*/
long xmlXPathOrderDocElems(xmlDocPtr doc)
{
return xmlXPathOrderDocElems_rust(doc);
}
/**
* xmlXPathCmpNodes:
* @node1: the first node
* @node2: the second node
*
* Compare two nodes w.r.t document order
*
* Returns -2 in case of error 1 if first point < second point, 0 if
* it's the same node, -1 otherwise
*/
int xmlXPathCmpNodes(xmlNodePtr node1, xmlNodePtr node2)
{
return xmlXPathCmpNodes_rust(node1, node2);
}
/**
* xmlXPathNodeSetSort:
* @set: the node set
*
* Sort the node set in document order
*/
void xmlXPathNodeSetSort(xmlNodeSetPtr set)
{
xmlXPathNodeSetSort_rust(set);
}
/**
* xmlXPathNodeSetFreeNs:
* @ns: the XPath namespace node found in a nodeset.
*
* Namespace nodes in libxml don't match the XPath semantic. In a node set
* the namespace nodes are duplicated and the next pointer is set to the
* parent node in the XPath semantic. Check if such a node needs to be freed
*/
void xmlXPathNodeSetFreeNs(xmlNsPtr ns)
{
xmlXPathNodeSetFreeNs_rust(ns);
}
/**
* xmlXPathNodeSetCreate:
* @val: an initial xmlNodePtr, or NULL
*
* Create a new xmlNodeSetPtr of type double and of value @val
*
* Returns the newly created object.
*/
xmlNodeSetPtr
xmlXPathNodeSetCreate(xmlNodePtr val)
{
return xmlXPathNodeSetCreate_rust(val);
}
/**
* xmlXPathNodeSetContains:
* @cur: the node-set
* @val: the node
*
* checks whether @cur contains @val
*
* Returns true (1) if @cur contains @val, false (0) otherwise
*/
int xmlXPathNodeSetContains(xmlNodeSetPtr cur, xmlNodePtr val)
{
return xmlXPathNodeSetContains_rust(cur, val);
}
/**
* xmlXPathNodeSetAddNs:
* @cur: the initial node set
* @node: the hosting node
* @ns: a the namespace node
*
* add a new namespace node to an existing NodeSet
*
* Returns 0 in case of success and -1 in case of error
*/
int xmlXPathNodeSetAddNs(xmlNodeSetPtr cur, xmlNodePtr node, xmlNsPtr ns)
{
return xmlXPathNodeSetAddNs_rust(cur, node, ns);
}
/**
* xmlXPathNodeSetAdd:
* @cur: the initial node set
* @val: a new xmlNodePtr
*
* add a new xmlNodePtr to an existing NodeSet
*
* Returns 0 in case of success, and -1 in case of error
*/
int xmlXPathNodeSetAdd(xmlNodeSetPtr cur, xmlNodePtr val)
{
return xmlXPathNodeSetAdd_rust(cur, val);
}
/**
* xmlXPathNodeSetAddUnique:
* @cur: the initial node set
* @val: a new xmlNodePtr
*
* add a new xmlNodePtr to an existing NodeSet, optimized version
* when we are sure the node is not already in the set.
*
* Returns 0 in case of success and -1 in case of failure
*/
int xmlXPathNodeSetAddUnique(xmlNodeSetPtr cur, xmlNodePtr val)
{
return xmlXPathNodeSetAddUnique_rust(cur, val);
}
/**
* xmlXPathNodeSetMerge:
* @val1: the first NodeSet or NULL
* @val2: the second NodeSet
*
* Merges two nodesets, all nodes from @val2 are added to @val1
* if @val1 is NULL, a new set is created and copied from @val2
*
* Returns @val1 once extended or NULL in case of error.
*/
xmlNodeSetPtr
xmlXPathNodeSetMerge(xmlNodeSetPtr val1, xmlNodeSetPtr val2)
{
return xmlXPathNodeSetMerge_rust(val1, val2);
}
/**
* xmlXPathNodeSetDel:
* @cur: the initial node set
* @val: an xmlNodePtr
*
* Removes an xmlNodePtr from an existing NodeSet
*/
void xmlXPathNodeSetDel(xmlNodeSetPtr cur, xmlNodePtr val)
{
xmlXPathNodeSetDel_rust(cur, val);
}
/**
* xmlXPathNodeSetRemove:
* @cur: the initial node set
* @val: the index to remove
*
* Removes an entry from an existing NodeSet list.
*/
void xmlXPathNodeSetRemove(xmlNodeSetPtr cur, int val)
{
xmlXPathNodeSetRemove_rust(cur, val);
}
/**
* xmlXPathFreeNodeSet:
* @obj: the xmlNodeSetPtr to free
*
* Free the NodeSet compound (not the actual nodes !).
*/
void xmlXPathFreeNodeSet(xmlNodeSetPtr obj)
{
xmlXPathFreeNodeSet_rust(obj);
}
#if defined(DEBUG) || defined(DEBUG_STEP)
/**
* xmlGenericErrorContextNodeSet:
* @output: a FILE * for the output
* @obj: the xmlNodeSetPtr to display
*
* Quick display of a NodeSet
*/
void xmlGenericErrorContextNodeSet(FILE *output, xmlNodeSetPtr obj)
{
xmlGenericErrorContextNodeSet_rust(output, obj);
}
#endif
/**
* xmlXPathNewNodeSet:
* @val: the NodePtr value
*
* Create a new xmlXPathObjectPtr of type NodeSet and initialize
* it with the single Node @val
*
* Returns the newly created object.
*/
xmlXPathObjectPtr
xmlXPathNewNodeSet(xmlNodePtr val)
{
return xmlXPathNewNodeSet_rust(val);
}
/**
* xmlXPathNewValueTree:
* @val: the NodePtr value
*
* Create a new xmlXPathObjectPtr of type Value Tree (XSLT) and initialize
* it with the tree root @val
*
* Returns the newly created object.
*/
xmlXPathObjectPtr
xmlXPathNewValueTree(xmlNodePtr val)
{
return xmlXPathNewValueTree_rust(val);
}
/**
* xmlXPathNewNodeSetList:
* @val: an existing NodeSet
*
* Create a new xmlXPathObjectPtr of type NodeSet and initialize
* it with the Nodeset @val
*
* Returns the newly created object.
*/
xmlXPathObjectPtr
xmlXPathNewNodeSetList(xmlNodeSetPtr val)
{
return xmlXPathNewNodeSetList_rust(val);
}
/**
* xmlXPathWrapNodeSet:
* @val: the NodePtr value
*
* Wrap the Nodeset @val in a new xmlXPathObjectPtr
*
* Returns the newly created object.
*/
xmlXPathObjectPtr
xmlXPathWrapNodeSet(xmlNodeSetPtr val)
{
return xmlXPathWrapNodeSet_rust(val);
}
/**
* xmlXPathFreeNodeSetList:
* @obj: an existing NodeSetList object
*
* Free up the xmlXPathObjectPtr @obj but don't deallocate the objects in
* the list contrary to xmlXPathFreeObject().
*/
void xmlXPathFreeNodeSetList(xmlXPathObjectPtr obj)
{
xmlXPathFreeNodeSetList_rust(obj);
}
/**
* xmlXPathDifference:
* @nodes1: a node-set
* @nodes2: a node-set
*
* Implements the EXSLT - Sets difference() function:
* node-set set:difference (node-set, node-set)
*
* Returns the difference between the two node sets, or nodes1 if
* nodes2 is empty
*/
xmlNodeSetPtr
xmlXPathDifference(xmlNodeSetPtr nodes1, xmlNodeSetPtr nodes2)
{
return xmlXPathDifference_rust(nodes1, nodes2);
}
/**
* xmlXPathIntersection:
* @nodes1: a node-set
* @nodes2: a node-set
*
* Implements the EXSLT - Sets intersection() function:
* node-set set:intersection (node-set, node-set)
*
* Returns a node set comprising the nodes that are within both the
* node sets passed as arguments
*/
xmlNodeSetPtr
xmlXPathIntersection(xmlNodeSetPtr nodes1, xmlNodeSetPtr nodes2)
{
return xmlXPathIntersection_rust(nodes1, nodes2);
}
/**
* xmlXPathDistinctSorted:
* @nodes: a node-set, sorted by document order
*
* Implements the EXSLT - Sets distinct() function:
* node-set set:distinct (node-set)
*
* Returns a subset of the nodes contained in @nodes, or @nodes if
* it is empty
*/
xmlNodeSetPtr
xmlXPathDistinctSorted(xmlNodeSetPtr nodes)
{
return xmlXPathDistinctSorted_rust(nodes);
}
/**
* xmlXPathDistinct:
* @nodes: a node-set
*
* Implements the EXSLT - Sets distinct() function:
* node-set set:distinct (node-set)
* @nodes is sorted by document order, then #exslSetsDistinctSorted
* is called with the sorted node-set
*
* Returns a subset of the nodes contained in @nodes, or @nodes if
* it is empty
*/
xmlNodeSetPtr
xmlXPathDistinct(xmlNodeSetPtr nodes)
{
return xmlXPathDistinct_rust(nodes);
}
/**
* xmlXPathHasSameNodes:
* @nodes1: a node-set
* @nodes2: a node-set
*
* Implements the EXSLT - Sets has-same-nodes function:
* boolean set:has-same-node(node-set, node-set)
*
* Returns true (1) if @nodes1 shares any node with @nodes2, false (0)
* otherwise
*/
int xmlXPathHasSameNodes(xmlNodeSetPtr nodes1, xmlNodeSetPtr nodes2)
{
return xmlXPathHasSameNodes_rust(nodes1, nodes2);
}
/**
* xmlXPathNodeLeadingSorted:
* @nodes: a node-set, sorted by document order
* @node: a node
*
* Implements the EXSLT - Sets leading() function:
* node-set set:leading (node-set, node-set)
*
* Returns the nodes in @nodes that precede @node in document order,
* @nodes if @node is NULL or an empty node-set if @nodes
* doesn't contain @node
*/
xmlNodeSetPtr
xmlXPathNodeLeadingSorted(xmlNodeSetPtr nodes, xmlNodePtr node)
{
return xmlXPathNodeLeadingSorted_rust(nodes, node);
}
/**
* xmlXPathNodeLeading:
* @nodes: a node-set
* @node: a node
*
* Implements the EXSLT - Sets leading() function:
* node-set set:leading (node-set, node-set)
* @nodes is sorted by document order, then #exslSetsNodeLeadingSorted
* is called.
*
* Returns the nodes in @nodes that precede @node in document order,
* @nodes if @node is NULL or an empty node-set if @nodes
* doesn't contain @node
*/
xmlNodeSetPtr
xmlXPathNodeLeading(xmlNodeSetPtr nodes, xmlNodePtr node)
{
return xmlXPathNodeLeading_rust(nodes, node);
}
/**
* xmlXPathLeadingSorted:
* @nodes1: a node-set, sorted by document order
* @nodes2: a node-set, sorted by document order
*
* Implements the EXSLT - Sets leading() function:
* node-set set:leading (node-set, node-set)
*
* Returns the nodes in @nodes1 that precede the first node in @nodes2
* in document order, @nodes1 if @nodes2 is NULL or empty or
* an empty node-set if @nodes1 doesn't contain @nodes2
*/
xmlNodeSetPtr
xmlXPathLeadingSorted(xmlNodeSetPtr nodes1, xmlNodeSetPtr nodes2)
{
return xmlXPathLeadingSorted_rust(nodes1, nodes2);
}
/**
* xmlXPathLeading:
* @nodes1: a node-set
* @nodes2: a node-set
*
* Implements the EXSLT - Sets leading() function:
* node-set set:leading (node-set, node-set)
* @nodes1 and @nodes2 are sorted by document order, then
* #exslSetsLeadingSorted is called.
*
* Returns the nodes in @nodes1 that precede the first node in @nodes2
* in document order, @nodes1 if @nodes2 is NULL or empty or
* an empty node-set if @nodes1 doesn't contain @nodes2
*/
xmlNodeSetPtr
xmlXPathLeading(xmlNodeSetPtr nodes1, xmlNodeSetPtr nodes2)
{
return xmlXPathLeading_rust(nodes1, nodes2);
}
/**
* xmlXPathNodeTrailingSorted:
* @nodes: a node-set, sorted by document order
* @node: a node
*
* Implements the EXSLT - Sets trailing() function:
* node-set set:trailing (node-set, node-set)
*
* Returns the nodes in @nodes that follow @node in document order,
* @nodes if @node is NULL or an empty node-set if @nodes
* doesn't contain @node
*/
xmlNodeSetPtr
xmlXPathNodeTrailingSorted(xmlNodeSetPtr nodes, xmlNodePtr node)
{
return xmlXPathNodeTrailingSorted_rust(nodes, node);
}
/**
* xmlXPathNodeTrailing:
* @nodes: a node-set
* @node: a node
*
* Implements the EXSLT - Sets trailing() function:
* node-set set:trailing (node-set, node-set)
* @nodes is sorted by document order, then #xmlXPathNodeTrailingSorted
* is called.
*
* Returns the nodes in @nodes that follow @node in document order,
* @nodes if @node is NULL or an empty node-set if @nodes
* doesn't contain @node
*/
xmlNodeSetPtr
xmlXPathNodeTrailing(xmlNodeSetPtr nodes, xmlNodePtr node)
{
return xmlXPathNodeTrailing_rust(nodes, node);
}
/**
* xmlXPathTrailingSorted:
* @nodes1: a node-set, sorted by document order
* @nodes2: a node-set, sorted by document order
*
* Implements the EXSLT - Sets trailing() function:
* node-set set:trailing (node-set, node-set)
*
* Returns the nodes in @nodes1 that follow the first node in @nodes2
* in document order, @nodes1 if @nodes2 is NULL or empty or
* an empty node-set if @nodes1 doesn't contain @nodes2
*/
xmlNodeSetPtr
xmlXPathTrailingSorted(xmlNodeSetPtr nodes1, xmlNodeSetPtr nodes2)
{
return xmlXPathTrailingSorted_rust(nodes1, nodes2);
}
/**
* xmlXPathTrailing:
* @nodes1: a node-set
* @nodes2: a node-set
*
* Implements the EXSLT - Sets trailing() function:
* node-set set:trailing (node-set, node-set)
* @nodes1 and @nodes2 are sorted by document order, then
* #xmlXPathTrailingSorted is called.
*
* Returns the nodes in @nodes1 that follow the first node in @nodes2
* in document order, @nodes1 if @nodes2 is NULL or empty or
* an empty node-set if @nodes1 doesn't contain @nodes2
*/
xmlNodeSetPtr
xmlXPathTrailing(xmlNodeSetPtr nodes1, xmlNodeSetPtr nodes2)
{
return xmlXPathTrailing_rust(nodes1, nodes2);
}
/**
* xmlXPathRegisterFunc:
* @ctxt: the XPath context
* @name: the function name
* @f: the function implementation or NULL
*
* Register a new function. If @f is NULL it unregisters the function
*
* Returns 0 in case of success, -1 in case of error
*/
int xmlXPathRegisterFunc(xmlXPathContextPtr ctxt, const xmlChar *name,
xmlXPathFunction f)
{
return xmlXPathRegisterFunc_rust(ctxt, name, f);
}
/**
* xmlXPathRegisterFuncNS:
* @ctxt: the XPath context
* @name: the function name
* @ns_uri: the function namespace URI
* @f: the function implementation or NULL
*
* Register a new function. If @f is NULL it unregisters the function
*
* Returns 0 in case of success, -1 in case of error
*/
int xmlXPathRegisterFuncNS(xmlXPathContextPtr ctxt, const xmlChar *name,
const xmlChar *ns_uri, xmlXPathFunction f)
{
return xmlXPathRegisterFuncNS_rust(ctxt, name, ns_uri, f);
}
/**
* xmlXPathRegisterFuncLookup:
* @ctxt: the XPath context
* @f: the lookup function
* @funcCtxt: the lookup data
*
* Registers an external mechanism to do function lookup.
*/
void xmlXPathRegisterFuncLookup(xmlXPathContextPtr ctxt,
xmlXPathFuncLookupFunc f,
void *funcCtxt)
{
xmlXPathRegisterFuncLookup_rust(ctxt, f, funcCtxt);
}
/**
* xmlXPathFunctionLookup:
* @ctxt: the XPath context
* @name: the function name
*
* Search in the Function array of the context for the given
* function.
*
* Returns the xmlXPathFunction or NULL if not found
*/
xmlXPathFunction
xmlXPathFunctionLookup(xmlXPathContextPtr ctxt, const xmlChar *name)
{
return xmlXPathFunctionLookup_rust(ctxt, name);
}
/**
* xmlXPathFunctionLookupNS:
* @ctxt: the XPath context
* @name: the function name
* @ns_uri: the function namespace URI
*
* Search in the Function array of the context for the given
* function.
*
* Returns the xmlXPathFunction or NULL if not found
*/
xmlXPathFunction
xmlXPathFunctionLookupNS(xmlXPathContextPtr ctxt, const xmlChar *name,
const xmlChar *ns_uri)
{
return xmlXPathFunctionLookupNS_rust(ctxt, name, ns_uri);
}
/**
* xmlXPathRegisteredFuncsCleanup:
* @ctxt: the XPath context
*
* Cleanup the XPath context data associated to registered functions
*/
void xmlXPathRegisteredFuncsCleanup(xmlXPathContextPtr ctxt)
{
xmlXPathRegisteredFuncsCleanup_rust(ctxt);
}
int xmlXPathRegisterVariable(xmlXPathContextPtr ctxt, const xmlChar *name,
xmlXPathObjectPtr value)
{
return xmlXPathRegisterVariable_rust(ctxt, name, value);
}
/**
* xmlXPathRegisterVariableNS:
* @ctxt: the XPath context
* @name: the variable name
* @ns_uri: the variable namespace URI
* @value: the variable value or NULL
*
* Register a new variable value. If @value is NULL it unregisters
* the variable
*
* Returns 0 in case of success, -1 in case of error
*/
int xmlXPathRegisterVariableNS(xmlXPathContextPtr ctxt, const xmlChar *name,
const xmlChar *ns_uri,
xmlXPathObjectPtr value)
{
return xmlXPathRegisterVariableNS_rust(ctxt, name, ns_uri, value);
}
void xmlXPathRegisterVariableLookup(xmlXPathContextPtr ctxt,
xmlXPathVariableLookupFunc f, void *data)
{
xmlXPathRegisterVariableLookup_rust(ctxt, f, data);
}
xmlXPathObjectPtr
xmlXPathVariableLookup(xmlXPathContextPtr ctxt, const xmlChar *name)
{
return xmlXPathVariableLookup_rust(ctxt, name);
}
/**
* xmlXPathVariableLookupNS:
* @ctxt: the XPath context
* @name: the variable name
* @ns_uri: the variable namespace URI
*
* Search in the Variable array of the context for the given
* variable value.
*
* Returns the a copy of the value or NULL if not found
*/
xmlXPathObjectPtr
xmlXPathVariableLookupNS(xmlXPathContextPtr ctxt, const xmlChar *name,
const xmlChar *ns_uri)
{
return xmlXPathVariableLookupNS_rust(ctxt, name, ns_uri);
}
/**
* xmlXPathRegisteredVariablesCleanup:
* @ctxt: the XPath context
*
* Cleanup the XPath context data associated to registered variables
*/
void xmlXPathRegisteredVariablesCleanup(xmlXPathContextPtr ctxt)
{
xmlXPathRegisteredVariablesCleanup_rust(ctxt);
}
/**
* xmlXPathRegisterNs:
* @ctxt: the XPath context
* @prefix: the namespace prefix cannot be NULL or empty string
* @ns_uri: the namespace name
*
* Register a new namespace. If @ns_uri is NULL it unregisters
* the namespace
*
* Returns 0 in case of success, -1 in case of error
*/
int xmlXPathRegisterNs(xmlXPathContextPtr ctxt, const xmlChar *prefix,
const xmlChar *ns_uri)
{
return xmlXPathRegisterNs_rust(ctxt, prefix, ns_uri);
}
/**
* xmlXPathNsLookup:
* @ctxt: the XPath context
* @prefix: the namespace prefix value
*
* Search in the namespace declaration array of the context for the given
* namespace name associated to the given prefix
*
* Returns the value or NULL if not found
*/
const xmlChar *
xmlXPathNsLookup(xmlXPathContextPtr ctxt, const xmlChar *prefix)
{
return xmlXPathNsLookup_rust(ctxt, prefix);
}
void xmlXPathRegisteredNsCleanup(xmlXPathContextPtr ctxt)
{
xmlXPathRegisteredNsCleanup_rust(ctxt);
}
xmlXPathObjectPtr
xmlXPathNewFloat(double val)
{
return xmlXPathNewFloat_rust(val);
}
/**
* xmlXPathNewBoolean:
* @val: the boolean value
*
* Create a new xmlXPathObjectPtr of type boolean and of value @val
*
* Returns the newly created object.
*/
xmlXPathObjectPtr
xmlXPathNewBoolean(int val)
{
return xmlXPathNewBoolean_rust(val);
}
/**
* xmlXPathNewString:
* @val: the xmlChar * value
*
* Create a new xmlXPathObjectPtr of type string and of value @val
*
* Returns the newly created object.
*/
xmlXPathObjectPtr
xmlXPathNewString(const xmlChar *val)
{
return xmlXPathNewString_rust(val);
}
/**
* xmlXPathWrapString:
* @val: the xmlChar * value
*
* Wraps the @val string into an XPath object.
*
* Returns the newly created object.
*/
xmlXPathObjectPtr
xmlXPathWrapString(xmlChar *val)
{
return xmlXPathWrapString_rust(val);
}
/**
* xmlXPathNewCString:
* @val: the char * value
*
* Create a new xmlXPathObjectPtr of type string and of value @val
*
* Returns the newly created object.
*/
xmlXPathObjectPtr
xmlXPathNewCString(const char *val)
{
return xmlXPathNewCString_rust(val);
}
/**
* xmlXPathWrapCString:
* @val: the char * value
*
* Wraps a string into an XPath object.
*
* Returns the newly created object.
*/
xmlXPathObjectPtr
xmlXPathWrapCString(char *val)
{
return xmlXPathWrapCString_rust(val);
}
/**
* xmlXPathWrapExternal:
* @val: the user data
*
* Wraps the @val data into an XPath object.
*
* Returns the newly created object.
*/
xmlXPathObjectPtr
xmlXPathWrapExternal(void *val)
{
return xmlXPathWrapExternal_rust(val);
}
/**
* xmlXPathObjectCopy:
* @val: the original object
*
* allocate a new copy of a given object
*
* Returns the newly created object.
*/
xmlXPathObjectPtr
xmlXPathObjectCopy(xmlXPathObjectPtr val)
{
return xmlXPathObjectCopy_rust(val);
}
/**
* xmlXPathFreeObject:
* @obj: the object to free
*
* Free up an xmlXPathObjectPtr object.
*/
void xmlXPathFreeObject(xmlXPathObjectPtr obj)
{
xmlXPathFreeObject_rust(obj);
}
/**
* xmlXPathCastBooleanToString:
* @val: a boolean
*
* Converts a boolean to its string value.
*
* Returns a newly allocated string.
*/
xmlChar *
xmlXPathCastBooleanToString(int val)
{
return xmlXPathCastBooleanToString_rust(val);
}
/**
* xmlXPathCastNumberToString:
* @val: a number
*
* Converts a number to its string value.
*
* Returns a newly allocated string.
*/
xmlChar *
xmlXPathCastNumberToString(double val)
{
return xmlXPathCastNumberToString_rust(val);
}
/**
* xmlXPathCastNodeToString:
* @node: a node
*
* Converts a node to its string value.
*
* Returns a newly allocated string.
*/
xmlChar *
xmlXPathCastNodeToString(xmlNodePtr node)
{
return xmlXPathCastNodeToString_rust(node);
}
/**
* xmlXPathCastNodeSetToString:
* @ns: a node-set
*
* Converts a node-set to its string value.
*
* Returns a newly allocated string.
*/
xmlChar *
xmlXPathCastNodeSetToString(xmlNodeSetPtr ns)
{
return xmlXPathCastNodeSetToString_rust(ns);
}
/**
* xmlXPathCastToString:
* @val: an XPath object
*
* Converts an existing object to its string() equivalent
*
* Returns the allocated string value of the object, NULL in case of error.
* It's up to the caller to free the string memory with xmlFree().
*/
xmlChar *
xmlXPathCastToString(xmlXPathObjectPtr val)
{
return xmlXPathCastToString_rust(val);
}
/**
* xmlXPathConvertString:
* @val: an XPath object
*
* Converts an existing object to its string() equivalent
*
* Returns the new object, the old one is freed (or the operation
* is done directly on @val)
*/
xmlXPathObjectPtr
xmlXPathConvertString(xmlXPathObjectPtr val)
{
return xmlXPathConvertString_rust(val);
}
/**
* xmlXPathCastBooleanToNumber:
* @val: a boolean
*
* Converts a boolean to its number value
*
* Returns the number value
*/
double
xmlXPathCastBooleanToNumber(int val)
{
return xmlXPathCastBooleanToNumber_rust(val);
}
/**
* xmlXPathCastStringToNumber:
* @val: a string
*
* Converts a string to its number value
*
* Returns the number value
*/
double
xmlXPathCastStringToNumber(const xmlChar *val)
{
return xmlXPathCastStringToNumber_rust(val);
}
/**
* xmlXPathCastNodeToNumber:
* @node: a node
*
* Converts a node to its number value
*
* Returns the number value
*/
double
xmlXPathCastNodeToNumber(xmlNodePtr node)
{
return xmlXPathCastNodeToNumber_rust(node);
}
/**
* xmlXPathCastNodeSetToNumber:
* @ns: a node-set
*
* Converts a node-set to its number value
*
* Returns the number value
*/
double
xmlXPathCastNodeSetToNumber(xmlNodeSetPtr ns)
{
return xmlXPathCastNodeSetToNumber_rust(ns);
}
/**
* xmlXPathCastToNumber:
* @val: an XPath object
*
* Converts an XPath object to its number value
*
* Returns the number value
*/
double
xmlXPathCastToNumber(xmlXPathObjectPtr val)
{
return xmlXPathCastToNumber_rust(val);
}
/**
* xmlXPathConvertNumber:
* @val: an XPath object
*
* Converts an existing object to its number() equivalent
*
* Returns the new object, the old one is freed (or the operation
* is done directly on @val)
*/
xmlXPathObjectPtr
xmlXPathConvertNumber(xmlXPathObjectPtr val)
{
return xmlXPathConvertNumber_rust(val);
}
/**
* xmlXPathCastNumberToBoolean:
* @val: a number
*
* Converts a number to its boolean value
*
* Returns the boolean value
*/
int xmlXPathCastNumberToBoolean(double val)
{
return xmlXPathCastNumberToBoolean_rust(val);
}
/**
* xmlXPathCastStringToBoolean:
* @val: a string
*
* Converts a string to its boolean value
*
* Returns the boolean value
*/
int xmlXPathCastStringToBoolean(const xmlChar *val)
{
return xmlXPathCastStringToBoolean_rust(val);
}
/**
* xmlXPathCastNodeSetToBoolean:
* @ns: a node-set
*
* Converts a node-set to its boolean value
*
* Returns the boolean value
*/
int xmlXPathCastNodeSetToBoolean(xmlNodeSetPtr ns)
{
return xmlXPathCastNodeSetToBoolean_rust(ns);
}
/**
* xmlXPathCastToBoolean:
* @val: an XPath object
*
* Converts an XPath object to its boolean value
*
* Returns the boolean value
*/
int xmlXPathCastToBoolean(xmlXPathObjectPtr val)
{
return xmlXPathCastToBoolean_rust(val);
}
/**
* xmlXPathConvertBoolean:
* @val: an XPath object
*
* Converts an existing object to its boolean() equivalent
*
* Returns the new object, the old one is freed (or the operation
* is done directly on @val)
*/
xmlXPathObjectPtr
xmlXPathConvertBoolean(xmlXPathObjectPtr val)
{
return xmlXPathConvertBoolean_rust(val);
}
/**
* xmlXPathNewContext:
* @doc: the XML document
*
* Create a new xmlXPathContext
*
* Returns the xmlXPathContext just allocated. The caller will need to free it.
*/
xmlXPathContextPtr
xmlXPathNewContext(xmlDocPtr doc)
{
return xmlXPathNewContext_rust(doc);
}
void xmlXPathFreeContext(xmlXPathContextPtr ctxt)
{
xmlXPathFreeContext_rust(ctxt);
}
/**
* xmlXPathNewParserContext:
* @str: the XPath expression
* @ctxt: the XPath context
*
* Create a new xmlXPathParserContext
*
* Returns the xmlXPathParserContext just allocated.
*/
xmlXPathParserContextPtr
xmlXPathNewParserContext(const xmlChar *str, xmlXPathContextPtr ctxt)
{
return xmlXPathNewParserContext_rust(str, ctxt);
}
/**
* xmlXPathFreeParserContext:
* @ctxt: the context to free
*
* Free up an xmlXPathParserContext
*/
void xmlXPathFreeParserContext(xmlXPathParserContextPtr ctxt)
{
xmlXPathFreeParserContext_rust(ctxt);
}
/**
* xmlXPathEqualValues:
* @ctxt: the XPath Parser context
*
* Implement the equal operation on XPath objects content: @arg1 == @arg2
*
* Returns 0 or 1 depending on the results of the test.
*/
int xmlXPathEqualValues(xmlXPathParserContextPtr ctxt)
{
return xmlXPathEqualValues_rust(ctxt);
}
/**
* xmlXPathNotEqualValues:
* @ctxt: the XPath Parser context
*
* Implement the equal operation on XPath objects content: @arg1 == @arg2
*
* Returns 0 or 1 depending on the results of the test.
*/
int xmlXPathNotEqualValues(xmlXPathParserContextPtr ctxt)
{
return xmlXPathNotEqualValues_rust(ctxt);
}
/**
* xmlXPathCompareValues:
* @ctxt: the XPath Parser context
* @inf: less than (1) or greater than (0)
* @strict: is the comparison strict
*
* Implement the compare operation on XPath objects:
* @arg1 < @arg2 (1, 1, ...
* @arg1 <= @arg2 (1, 0, ...
* @arg1 > @arg2 (0, 1, ...
* @arg1 >= @arg2 (0, 0, ...
*
* When neither object to be compared is a node-set and the operator is
* <=, <, >=, >, then the objects are compared by converted both objects
* to numbers and comparing the numbers according to IEEE 754. The <
* comparison will be true if and only if the first number is less than the
* second number. The <= comparison will be true if and only if the first
* number is less than or equal to the second number. The > comparison
* will be true if and only if the first number is greater than the second
* number. The >= comparison will be true if and only if the first number
* is greater than or equal to the second number.
*
* Returns 1 if the comparison succeeded, 0 if it failed
*/
int xmlXPathCompareValues(xmlXPathParserContextPtr ctxt, int inf, int strict)
{
return xmlXPathCompareValues_rust(ctxt, inf, strict);
}
/**
* xmlXPathValueFlipSign:
* @ctxt: the XPath Parser context
*
* Implement the unary - operation on an XPath object
* The numeric operators convert their operands to numbers as if
* by calling the number function.
*/
void xmlXPathValueFlipSign(xmlXPathParserContextPtr ctxt)
{
xmlXPathValueFlipSign_rust(ctxt);
}
/**
* xmlXPathAddValues:
* @ctxt: the XPath Parser context
*
* Implement the add operation on XPath objects:
* The numeric operators convert their operands to numbers as if
* by calling the number function.
*/
void xmlXPathAddValues(xmlXPathParserContextPtr ctxt)
{
xmlXPathAddValues_rust(ctxt);
}
/**
* xmlXPathSubValues:
* @ctxt: the XPath Parser context
*
* Implement the subtraction operation on XPath objects:
* The numeric operators convert their operands to numbers as if
* by calling the number function.
*/
void xmlXPathSubValues(xmlXPathParserContextPtr ctxt)
{
xmlXPathSubValues_rust(ctxt);
}
/**
* xmlXPathMultValues:
* @ctxt: the XPath Parser context
*
* Implement the multiply operation on XPath objects:
* The numeric operators convert their operands to numbers as if
* by calling the number function.
*/
void xmlXPathMultValues(xmlXPathParserContextPtr ctxt)
{
xmlXPathMultValues_rust(ctxt);
}
/**
* xmlXPathDivValues:
* @ctxt: the XPath Parser context
*
* Implement the div operation on XPath objects @arg1 / @arg2:
* The numeric operators convert their operands to numbers as if
* by calling the number function.
*/
ATTRIBUTE_NO_SANITIZE("float-divide-by-zero")
void xmlXPathDivValues(xmlXPathParserContextPtr ctxt)
{
xmlXPathDivValues_rust(ctxt);
}
/**
* xmlXPathModValues:
* @ctxt: the XPath Parser context
*
* Implement the mod operation on XPath objects: @arg1 / @arg2
* The numeric operators convert their operands to numbers as if
* by calling the number function.
*/
void xmlXPathModValues(xmlXPathParserContextPtr ctxt)
{
xmlXPathModValues_rust(ctxt);
}
/************************************************************************
* *
* The traversal functions *
* *
************************************************************************/
/*
* A traversal function enumerates nodes along an axis.
* Initially it must be called with NULL, and it indicates
* termination on the axis by returning NULL.
*/
typedef xmlNodePtr (*xmlXPathTraversalFunction)(xmlXPathParserContextPtr ctxt, xmlNodePtr cur);
/*
* xmlXPathTraversalFunctionExt:
* A traversal function enumerates nodes along an axis.
* Initially it must be called with NULL, and it indicates
* termination on the axis by returning NULL.
* The context node of the traversal is specified via @contextNode.
*/
typedef xmlNodePtr (*xmlXPathTraversalFunctionExt)(xmlNodePtr cur, xmlNodePtr contextNode);
/*
* xmlXPathNodeSetMergeFunction:
* Used for merging node sets in xmlXPathCollectAndTest().
*/
typedef xmlNodeSetPtr (*xmlXPathNodeSetMergeFunction)(xmlNodeSetPtr, xmlNodeSetPtr);
/**
* xmlXPathNextSelf:
* @ctxt: the XPath Parser context
* @cur: the current node in the traversal
*
* Traversal function for the "self" direction
* The self axis contains just the context node itself
*
* Returns the next element following that axis
*/
xmlNodePtr
xmlXPathNextSelf(xmlXPathParserContextPtr ctxt, xmlNodePtr cur)
{
return xmlXPathNextSelf_rust(ctxt, cur);
}
/**
* xmlXPathNextChild:
* @ctxt: the XPath Parser context
* @cur: the current node in the traversal
*
* Traversal function for the "child" direction
* The child axis contains the children of the context node in document order.
*
* Returns the next element following that axis
*/
xmlNodePtr
xmlXPathNextChild(xmlXPathParserContextPtr ctxt, xmlNodePtr cur)
{
return xmlXPathNextChild_rust(ctxt, cur);
}
/**
* xmlXPathNextDescendant:
* @ctxt: the XPath Parser context
* @cur: the current node in the traversal
*
* Traversal function for the "descendant" direction
* the descendant axis contains the descendants of the context node in document
* order; a descendant is a child or a child of a child and so on.
*
* Returns the next element following that axis
*/
xmlNodePtr
xmlXPathNextDescendant(xmlXPathParserContextPtr ctxt, xmlNodePtr cur)
{
return xmlXPathNextDescendant_rust(ctxt, cur);
}
/**
* xmlXPathNextDescendantOrSelf:
* @ctxt: the XPath Parser context
* @cur: the current node in the traversal
*
* Traversal function for the "descendant-or-self" direction
* the descendant-or-self axis contains the context node and the descendants
* of the context node in document order; thus the context node is the first
* node on the axis, and the first child of the context node is the second node
* on the axis
*
* Returns the next element following that axis
*/
xmlNodePtr
xmlXPathNextDescendantOrSelf(xmlXPathParserContextPtr ctxt, xmlNodePtr cur)
{
return xmlXPathNextDescendantOrSelf_rust(ctxt, cur);
}
/**
* xmlXPathNextParent:
* @ctxt: the XPath Parser context
* @cur: the current node in the traversal
*
* Traversal function for the "parent" direction
* The parent axis contains the parent of the context node, if there is one.
*
* Returns the next element following that axis
*/
xmlNodePtr
xmlXPathNextParent(xmlXPathParserContextPtr ctxt, xmlNodePtr cur)
{
return xmlXPathNextParent_rust(ctxt, cur);
}
/**
* xmlXPathNextAncestor:
* @ctxt: the XPath Parser context
* @cur: the current node in the traversal
*
* Traversal function for the "ancestor" direction
* the ancestor axis contains the ancestors of the context node; the ancestors
* of the context node consist of the parent of context node and the parent's
* parent and so on; the nodes are ordered in reverse document order; thus the
* parent is the first node on the axis, and the parent's parent is the second
* node on the axis
*
* Returns the next element following that axis
*/
xmlNodePtr
xmlXPathNextAncestor(xmlXPathParserContextPtr ctxt, xmlNodePtr cur)
{
return xmlXPathNextAncestor_rust(ctxt, cur);
}
/**
* xmlXPathNextAncestorOrSelf:
* @ctxt: the XPath Parser context
* @cur: the current node in the traversal
*
* Traversal function for the "ancestor-or-self" direction
* he ancestor-or-self axis contains the context node and ancestors of
* the context node in reverse document order; thus the context node is
* the first node on the axis, and the context node's parent the second;
* parent here is defined the same as with the parent axis.
*
* Returns the next element following that axis
*/
xmlNodePtr
xmlXPathNextAncestorOrSelf(xmlXPathParserContextPtr ctxt, xmlNodePtr cur)
{
return xmlXPathNextAncestorOrSelf_rust(ctxt, cur);
}
/**
* xmlXPathNextFollowingSibling:
* @ctxt: the XPath Parser context
* @cur: the current node in the traversal
*
* Traversal function for the "following-sibling" direction
* The following-sibling axis contains the following siblings of the context
* node in document order.
*
* Returns the next element following that axis
*/
xmlNodePtr
xmlXPathNextFollowingSibling(xmlXPathParserContextPtr ctxt, xmlNodePtr cur)
{
return xmlXPathNextFollowingSibling_rust(ctxt, cur);
}
/**
* xmlXPathNextPrecedingSibling:
* @ctxt: the XPath Parser context
* @cur: the current node in the traversal
*
* Traversal function for the "preceding-sibling" direction
* The preceding-sibling axis contains the preceding siblings of the context
* node in reverse document order; the first preceding sibling is first on the
* axis; the sibling preceding that node is the second on the axis and so on.
*
* Returns the next element following that axis
*/
xmlNodePtr
xmlXPathNextPrecedingSibling(xmlXPathParserContextPtr ctxt, xmlNodePtr cur)
{
return xmlXPathNextPrecedingSibling_rust(ctxt, cur);
}
/**
* xmlXPathNextFollowing:
* @ctxt: the XPath Parser context
* @cur: the current node in the traversal
*
* Traversal function for the "following" direction
* The following axis contains all nodes in the same document as the context
* node that are after the context node in document order, excluding any
* descendants and excluding attribute nodes and namespace nodes; the nodes
* are ordered in document order
*
* Returns the next element following that axis
*/
xmlNodePtr
xmlXPathNextFollowing(xmlXPathParserContextPtr ctxt, xmlNodePtr cur)
{
return xmlXPathNextFollowing_rust(ctxt, cur);
}
/**
* xmlXPathNextPreceding:
* @ctxt: the XPath Parser context
* @cur: the current node in the traversal
*
* Traversal function for the "preceding" direction
* the preceding axis contains all nodes in the same document as the context
* node that are before the context node in document order, excluding any
* ancestors and excluding attribute nodes and namespace nodes; the nodes are
* ordered in reverse document order
*
* Returns the next element following that axis
*/
xmlNodePtr
xmlXPathNextPreceding(xmlXPathParserContextPtr ctxt, xmlNodePtr cur)
{
return xmlXPathNextPreceding_rust(ctxt, cur);
}
/**
* xmlXPathNextNamespace:
* @ctxt: the XPath Parser context
* @cur: the current attribute in the traversal
*
* Traversal function for the "namespace" direction
* the namespace axis contains the namespace nodes of the context node;
* the order of nodes on this axis is implementation-defined; the axis will
* be empty unless the context node is an element
*
* We keep the XML namespace node at the end of the list.
*
* Returns the next element following that axis
*/
xmlNodePtr
xmlXPathNextNamespace(xmlXPathParserContextPtr ctxt, xmlNodePtr cur)
{
return xmlXPathNextNamespace_rust(ctxt, cur);
}
/**
* xmlXPathNextAttribute:
* @ctxt: the XPath Parser context
* @cur: the current attribute in the traversal
*
* Traversal function for the "attribute" direction
* TODO: support DTD inherited default attributes
*
* Returns the next element following that axis
*/
xmlNodePtr
xmlXPathNextAttribute(xmlXPathParserContextPtr ctxt, xmlNodePtr cur)
{
return xmlXPathNextAttribute_rust(ctxt, cur);
}
/**
* xmlXPathRoot:
* @ctxt: the XPath Parser context
*
* Initialize the context to the root of the document
*/
void xmlXPathRoot(xmlXPathParserContextPtr ctxt)
{
xmlXPathRoot_rust(ctxt);
}
/**
* xmlXPathLastFunction:
* @ctxt: the XPath Parser context
* @nargs: the number of arguments
*
* Implement the last() XPath function
* number last()
* The last function returns the number of nodes in the context node list.
*/
void xmlXPathLastFunction(xmlXPathParserContextPtr ctxt, int nargs)
{
xmlXPathLastFunction_rust(ctxt, nargs);
}
/**
* xmlXPathPositionFunction:
* @ctxt: the XPath Parser context
* @nargs: the number of arguments
*
* Implement the position() XPath function
* number position()
* The position function returns the position of the context node in the
* context node list. The first position is 1, and so the last position
* will be equal to last().
*/
void xmlXPathPositionFunction(xmlXPathParserContextPtr ctxt, int nargs)
{
xmlXPathPositionFunction_rust(ctxt, nargs);
}
/**
* xmlXPathCountFunction:
* @ctxt: the XPath Parser context
* @nargs: the number of arguments
*
* Implement the count() XPath function
* number count(node-set)
*/
void xmlXPathCountFunction(xmlXPathParserContextPtr ctxt, int nargs)
{
xmlXPathCountFunction_rust(ctxt, nargs);
}
/**
* xmlXPathIdFunction:
* @ctxt: the XPath Parser context
* @nargs: the number of arguments
*
* Implement the id() XPath function
* node-set id(object)
* The id function selects elements by their unique ID
* (see [5.2.1 Unique IDs]). When the argument to id is of type node-set,
* then the result is the union of the result of applying id to the
* string value of each of the nodes in the argument node-set. When the
* argument to id is of any other type, the argument is converted to a
* string as if by a call to the string function; the string is split
* into a whitespace-separated list of tokens (whitespace is any sequence
* of characters matching the production S); the result is a node-set
* containing the elements in the same document as the context node that
* have a unique ID equal to any of the tokens in the list.
*/
void xmlXPathIdFunction(xmlXPathParserContextPtr ctxt, int nargs)
{
xmlXPathIdFunction_rust(ctxt, nargs);
}
/**
* xmlXPathLocalNameFunction:
* @ctxt: the XPath Parser context
* @nargs: the number of arguments
*
* Implement the local-name() XPath function
* string local-name(node-set?)
* The local-name function returns a string containing the local part
* of the name of the node in the argument node-set that is first in
* document order. If the node-set is empty or the first node has no
* name, an empty string is returned. If the argument is omitted it
* defaults to the context node.
*/
void xmlXPathLocalNameFunction(xmlXPathParserContextPtr ctxt, int nargs)
{
xmlXPathLocalNameFunction_rust(ctxt, nargs);
}
/**
* xmlXPathNamespaceURIFunction:
* @ctxt: the XPath Parser context
* @nargs: the number of arguments
*
* Implement the namespace-uri() XPath function
* string namespace-uri(node-set?)
* The namespace-uri function returns a string containing the
* namespace URI of the expanded name of the node in the argument
* node-set that is first in document order. If the node-set is empty,
* the first node has no name, or the expanded name has no namespace
* URI, an empty string is returned. If the argument is omitted it
* defaults to the context node.
*/
void xmlXPathNamespaceURIFunction(xmlXPathParserContextPtr ctxt, int nargs)
{
xmlXPathNamespaceURIFunction_rust(ctxt, nargs);
}
/**
* xmlXPathStringFunction:
* @ctxt: the XPath Parser context
* @nargs: the number of arguments
*
* Implement the string() XPath function
* string string(object?)
* The string function converts an object to a string as follows:
* - A node-set is converted to a string by returning the value of
* the node in the node-set that is first in document order.
* If the node-set is empty, an empty string is returned.
* - A number is converted to a string as follows
* + NaN is converted to the string NaN
* + positive zero is converted to the string 0
* + negative zero is converted to the string 0
* + positive infinity is converted to the string Infinity
* + negative infinity is converted to the string -Infinity
* + if the number is an integer, the number is represented in
* decimal form as a Number with no decimal point and no leading
* zeros, preceded by a minus sign (-) if the number is negative
* + otherwise, the number is represented in decimal form as a
* Number including a decimal point with at least one digit
* before the decimal point and at least one digit after the
* decimal point, preceded by a minus sign (-) if the number
* is negative; there must be no leading zeros before the decimal
* point apart possibly from the one required digit immediately
* before the decimal point; beyond the one required digit
* after the decimal point there must be as many, but only as
* many, more digits as are needed to uniquely distinguish the
* number from all other IEEE 754 numeric values.
* - The boolean false value is converted to the string false.
* The boolean true value is converted to the string true.
*
* If the argument is omitted, it defaults to a node-set with the
* context node as its only member.
*/
void xmlXPathStringFunction(xmlXPathParserContextPtr ctxt, int nargs)
{
xmlXPathStringFunction_rust(ctxt, nargs);
}
/**
* xmlXPathStringLengthFunction:
* @ctxt: the XPath Parser context
* @nargs: the number of arguments
*
* Implement the string-length() XPath function
* number string-length(string?)
* The string-length returns the number of characters in the string
* (see [3.6 Strings]). If the argument is omitted, it defaults to
* the context node converted to a string, in other words the value
* of the context node.
*/
void xmlXPathStringLengthFunction(xmlXPathParserContextPtr ctxt, int nargs)
{
xmlXPathStringLengthFunction_rust(ctxt, nargs);
}
/**
* xmlXPathConcatFunction:
* @ctxt: the XPath Parser context
* @nargs: the number of arguments
*
* Implement the concat() XPath function
* string concat(string, string, string*)
* The concat function returns the concatenation of its arguments.
*/
void xmlXPathConcatFunction(xmlXPathParserContextPtr ctxt, int nargs)
{
xmlXPathConcatFunction_rust(ctxt, nargs);
}
/**
* xmlXPathContainsFunction:
* @ctxt: the XPath Parser context
* @nargs: the number of arguments
*
* Implement the contains() XPath function
* boolean contains(string, string)
* The contains function returns true if the first argument string
* contains the second argument string, and otherwise returns false.
*/
void xmlXPathContainsFunction(xmlXPathParserContextPtr ctxt, int nargs)
{
xmlXPathContainsFunction_rust(ctxt, nargs);
}
/**
* xmlXPathStartsWithFunction:
* @ctxt: the XPath Parser context
* @nargs: the number of arguments
*
* Implement the starts-with() XPath function
* boolean starts-with(string, string)
* The starts-with function returns true if the first argument string
* starts with the second argument string, and otherwise returns false.
*/
void xmlXPathStartsWithFunction(xmlXPathParserContextPtr ctxt, int nargs)
{
xmlXPathStartsWithFunction_rust(ctxt, nargs);
}
/**
* xmlXPathSubstringFunction:
* @ctxt: the XPath Parser context
* @nargs: the number of arguments
*
* Implement the substring() XPath function
* string substring(string, number, number?)
* The substring function returns the substring of the first argument
* starting at the position specified in the second argument with
* length specified in the third argument. For example,
* substring("12345",2,3) returns "234". If the third argument is not
* specified, it returns the substring starting at the position specified
* in the second argument and continuing to the end of the string. For
* example, substring("12345",2) returns "2345". More precisely, each
* character in the string (see [3.6 Strings]) is considered to have a
* numeric position: the position of the first character is 1, the position
* of the second character is 2 and so on. The returned substring contains
* those characters for which the position of the character is greater than
* or equal to the second argument and, if the third argument is specified,
* less than the sum of the second and third arguments; the comparisons
* and addition used for the above follow the standard IEEE 754 rules. Thus:
* - substring("12345", 1.5, 2.6) returns "234"
* - substring("12345", 0, 3) returns "12"
* - substring("12345", 0 div 0, 3) returns ""
* - substring("12345", 1, 0 div 0) returns ""
* - substring("12345", -42, 1 div 0) returns "12345"
* - substring("12345", -1 div 0, 1 div 0) returns ""
*/
void xmlXPathSubstringFunction(xmlXPathParserContextPtr ctxt, int nargs)
{
xmlXPathSubstringFunction_rust(ctxt, nargs);
}
/**
* xmlXPathSubstringBeforeFunction:
* @ctxt: the XPath Parser context
* @nargs: the number of arguments
*
* Implement the substring-before() XPath function
* string substring-before(string, string)
* The substring-before function returns the substring of the first
* argument string that precedes the first occurrence of the second
* argument string in the first argument string, or the empty string
* if the first argument string does not contain the second argument
* string. For example, substring-before("1999/04/01","/") returns 1999.
*/
void xmlXPathSubstringBeforeFunction(xmlXPathParserContextPtr ctxt, int nargs)
{
xmlXPathSubstringBeforeFunction_rust(ctxt, nargs);
}
void xmlXPathSubstringAfterFunction(xmlXPathParserContextPtr ctxt, int nargs)
{
xmlXPathSubstringAfterFunction_rust(ctxt, nargs);
}
void xmlXPathNormalizeFunction(xmlXPathParserContextPtr ctxt, int nargs)
{
xmlXPathNormalizeFunction_rust(ctxt, nargs);
}
void xmlXPathTranslateFunction(xmlXPathParserContextPtr ctxt, int nargs)
{
xmlXPathTranslateFunction_rust(ctxt, nargs);
}
void xmlXPathBooleanFunction(xmlXPathParserContextPtr ctxt, int nargs)
{
xmlXPathBooleanFunction_rust(ctxt, nargs);
}
void xmlXPathNotFunction(xmlXPathParserContextPtr ctxt, int nargs)
{
xmlXPathNotFunction_rust(ctxt, nargs);
}
void xmlXPathTrueFunction(xmlXPathParserContextPtr ctxt, int nargs)
{
xmlXPathTrueFunction_rust(ctxt, nargs);
}
void xmlXPathFalseFunction(xmlXPathParserContextPtr ctxt, int nargs)
{
xmlXPathFalseFunction_rust(ctxt, nargs);
}
void xmlXPathLangFunction(xmlXPathParserContextPtr ctxt, int nargs)
{
xmlXPathLangFunction_rust(ctxt, nargs);
}
/**
* xmlXPathNumberFunction:
* @ctxt: the XPath Parser context
* @nargs: the number of arguments
*
* Implement the number() XPath function
* number number(object?)
*/
void xmlXPathNumberFunction(xmlXPathParserContextPtr ctxt, int nargs)
{
xmlXPathNumberFunction_rust(ctxt, nargs);
}
/**
* xmlXPathSumFunction:
* @ctxt: the XPath Parser context
* @nargs: the number of arguments
*
* Implement the sum() XPath function
* number sum(node-set)
* The sum function returns the sum of the values of the nodes in
* the argument node-set.
*/
void xmlXPathSumFunction(xmlXPathParserContextPtr ctxt, int nargs)
{
xmlXPathSumFunction_rust(ctxt, nargs);
}
/**
* xmlXPathFloorFunction:
* @ctxt: the XPath Parser context
* @nargs: the number of arguments
*
* Implement the floor() XPath function
* number floor(number)
* The floor function returns the largest (closest to positive infinity)
* number that is not greater than the argument and that is an integer.
*/
void xmlXPathFloorFunction(xmlXPathParserContextPtr ctxt, int nargs)
{
xmlXPathFloorFunction_rust(ctxt, nargs);
}
/**
* xmlXPathCeilingFunction:
* @ctxt: the XPath Parser context
* @nargs: the number of arguments
*
* Implement the ceiling() XPath function
* number ceiling(number)
* The ceiling function returns the smallest (closest to negative infinity)
* number that is not less than the argument and that is an integer.
*/
void xmlXPathCeilingFunction(xmlXPathParserContextPtr ctxt, int nargs)
{
xmlXPathCeilingFunction_rust(ctxt, nargs);
}
/**
* xmlXPathRoundFunction:
* @ctxt: the XPath Parser context
* @nargs: the number of arguments
*
* Implement the round() XPath function
* number round(number)
* The round function returns the number that is closest to the
* argument and that is an integer. If there are two such numbers,
* then the one that is closest to positive infinity is returned.
*/
void xmlXPathRoundFunction(xmlXPathParserContextPtr ctxt, int nargs)
{
xmlXPathRoundFunction_rust(ctxt, nargs);
}
/**
* xmlXPathParseNCName:
* @ctxt: the XPath Parser context
*
* parse an XML namespace non qualified name.
*
* [NS 3] NCName ::= (Letter | '_') (NCNameChar)*
*
* [NS 4] NCNameChar ::= Letter | Digit | '.' | '-' | '_' |
* CombiningChar | Extender
*
* Returns the namespace name or NULL
*/
xmlChar *
xmlXPathParseNCName(xmlXPathParserContextPtr ctxt)
{
return xmlXPathParseNCName_rust(ctxt);
}
/**
* xmlXPathParseName:
* @ctxt: the XPath Parser context
*
* parse an XML name
*
* [4] NameChar ::= Letter | Digit | '.' | '-' | '_' | ':' |
* CombiningChar | Extender
*
* [5] Name ::= (Letter | '_' | ':') (NameChar)*
*
* Returns the namespace name or NULL
*/
xmlChar *
xmlXPathParseName(xmlXPathParserContextPtr ctxt)
{
return xmlXPathParseName_rust(ctxt);
}
/**
* xmlXPathStringEvalNumber:
* @str: A string to scan
*
* [30a] Float ::= Number ('e' Digits?)?
*
* [30] Number ::= Digits ('.' Digits?)?
* | '.' Digits
* [31] Digits ::= [0-9]+
*
* Compile a Number in the string
* In complement of the Number expression, this function also handles
* negative values : '-' Number.
*
* Returns the double value.
*/
double
xmlXPathStringEvalNumber(const xmlChar *str)
{
return xmlXPathStringEvalNumber_rust(str);
}
/**
* xmlXPathIsNodeType:
* @name: a name string
*
* Is the name given a NodeType one.
*
* [38] NodeType ::= 'comment'
* | 'text'
* | 'processing-instruction'
* | 'node'
*
* Returns 1 if true 0 otherwise
*/
int xmlXPathIsNodeType(const xmlChar *name)
{
return xmlXPathIsNodeType_rust(name);
}
/**
* xmlXPathEvalPredicate:
* @ctxt: the XPath context
* @res: the Predicate Expression evaluation result
*
* Evaluate a predicate result for the current node.
* A PredicateExpr is evaluated by evaluating the Expr and converting
* the result to a boolean. If the result is a number, the result will
* be converted to true if the number is equal to the position of the
* context node in the context node list (as returned by the position
* function) and will be converted to false otherwise; if the result
* is not a number, then the result will be converted as if by a call
* to the boolean function.
*
* Returns 1 if predicate is true, 0 otherwise
*/
int xmlXPathEvalPredicate(xmlXPathContextPtr ctxt, xmlXPathObjectPtr res)
{
return xmlXPathEvalPredicate_rust(ctxt, res);
}
/**
* xmlXPathEvaluatePredicateResult:
* @ctxt: the XPath Parser context
* @res: the Predicate Expression evaluation result
*
* Evaluate a predicate result for the current node.
* A PredicateExpr is evaluated by evaluating the Expr and converting
* the result to a boolean. If the result is a number, the result will
* be converted to true if the number is equal to the position of the
* context node in the context node list (as returned by the position
* function) and will be converted to false otherwise; if the result
* is not a number, then the result will be converted as if by a call
* to the boolean function.
*
* Returns 1 if predicate is true, 0 otherwise
*/
int xmlXPathEvaluatePredicateResult(xmlXPathParserContextPtr ctxt,
xmlXPathObjectPtr res)
{
return xmlXPathEvaluatePredicateResult_rust(ctxt, res);
}
/**
* xmlXPathCtxtCompile:
* @ctxt: an XPath context
* @str: the XPath expression
*
* Compile an XPath expression
*
* Returns the xmlXPathCompExprPtr resulting from the compilation or NULL.
* the caller has to free the object.
*/
xmlXPathCompExprPtr
xmlXPathCtxtCompile(xmlXPathContextPtr ctxt, const xmlChar *str)
{
return xmlXPathCtxtCompile_rust(ctxt, str);
}
/**
* xmlXPathCompile:
* @str: the XPath expression
*
* Compile an XPath expression
*
* Returns the xmlXPathCompExprPtr resulting from the compilation or NULL.
* the caller has to free the object.
*/
xmlXPathCompExprPtr
xmlXPathCompile(const xmlChar *str)
{
return xmlXPathCompile_rust(str);
}
/**
* xmlXPathCompiledEval:
* @comp: the compiled XPath expression
* @ctx: the XPath context
*
* Evaluate the Precompiled XPath expression in the given context.
*
* Returns the xmlXPathObjectPtr resulting from the evaluation or NULL.
* the caller has to free the object.
*/
xmlXPathObjectPtr
xmlXPathCompiledEval(xmlXPathCompExprPtr comp, xmlXPathContextPtr ctx)
{
return xmlXPathCompiledEval_rust(comp, ctx);
}
/**
* xmlXPathCompiledEvalToBoolean:
* @comp: the compiled XPath expression
* @ctxt: the XPath context
*
* Applies the XPath boolean() function on the result of the given
* compiled expression.
*
* Returns 1 if the expression evaluated to true, 0 if to false and
* -1 in API and internal errors.
*/
int xmlXPathCompiledEvalToBoolean(xmlXPathCompExprPtr comp,
xmlXPathContextPtr ctxt)
{
return xmlXPathCompiledEvalToBoolean_rust(comp, ctxt);
}
/**
* xmlXPathEvalExpr:
* @ctxt: the XPath Parser context
*
* Parse and evaluate an XPath expression in the given context,
* then push the result on the context stack
*/
void xmlXPathEvalExpr(xmlXPathParserContextPtr ctxt)
{
xmlXPathEvalExpr_rust(ctxt);
}
/**
* xmlXPathEval:
* @str: the XPath expression
* @ctx: the XPath context
*
* Evaluate the XPath Location Path in the given context.
*
* Returns the xmlXPathObjectPtr resulting from the evaluation or NULL.
* the caller has to free the object.
*/
xmlXPathObjectPtr
xmlXPathEval(const xmlChar *str, xmlXPathContextPtr ctx)
{
return xmlXPathEval_rust(str, ctx);
}
/**
* xmlXPathSetContextNode:
* @node: the node to to use as the context node
* @ctx: the XPath context
*
* Sets 'node' as the context node. The node must be in the same
* document as that associated with the context.
*
* Returns -1 in case of error or 0 if successful
*/
int xmlXPathSetContextNode(xmlNodePtr node, xmlXPathContextPtr ctx)
{
return xmlXPathSetContextNode_rust(node, ctx);
}
/**
* xmlXPathNodeEval:
* @node: the node to to use as the context node
* @str: the XPath expression
* @ctx: the XPath context
*
* Evaluate the XPath Location Path in the given context. The node 'node'
* is set as the context node. The context node is not restored.
*
* Returns the xmlXPathObjectPtr resulting from the evaluation or NULL.
* the caller has to free the object.
*/
xmlXPathObjectPtr
xmlXPathNodeEval(xmlNodePtr node, const xmlChar *str, xmlXPathContextPtr ctx)
{
return xmlXPathNodeEval_rust(node, str, ctx);
}
/**
* xmlXPathEvalExpression:
* @str: the XPath expression
* @ctxt: the XPath context
*
* Alias for xmlXPathEval().
*
* Returns the xmlXPathObjectPtr resulting from the evaluation or NULL.
* the caller has to free the object.
*/
xmlXPathObjectPtr
xmlXPathEvalExpression(const xmlChar *str, xmlXPathContextPtr ctxt)
{
return xmlXPathEvalExpression_rust(str, ctxt);
}
/**
* xmlXPathRegisterAllFunctions:
* @ctxt: the XPath context
*
* Registers all default XPath functions in this context
*/
void xmlXPathRegisterAllFunctions(xmlXPathContextPtr ctxt)
{
xmlXPathRegisterAllFunctions_rust(ctxt);
}
#endif /* LIBXML_XPATH_ENABLED */
#else /* not COMPILE_WITH_RUST */
int get_xp_optimized_non_elem_comparison(){
printf("get_xp_optimized_non_elem_comparison in c");
#ifdef XP_OPTIMIZED_NON_ELEM_COMPARISON
printf("XP_OPTIMIZED_NON_ELEM_COMPARISON in c");
return 1;
#else
printf("XP_OPTIMIZED_NON_ELEM_COMPARISON notin c");
return 0;
#endif
}
int get_with_tim_sort(){
printf("get_with_tim_sort in c");
#ifdef WITH_TIM_SORT
printf("WITH_TIM_SORT in c");
return 1;
#else
printf("WITH_TIM_SORT notin c");
return 0;
#endif
}
int get_xp_optimized_filter_first(){
printf("get_xp_optimized_filter_first in c");
#ifdef XP_OPTIMIZED_FILTER_FIRST
printf("XP_OPTIMIZED_FILTER_FIRST in c");
return 1;
#else
printf("XP_OPTIMIZED_FILTER_FIRST notin c");
return 0;
#endif
}
int get_debug_eval_counts(){
printf("get_debug_eval_counts in c");
#ifdef DEBUG_EVAL_COUNTS
printf("DEBUG_EVAL_COUNTS in c");
return 1;
#else
printf("DEBUG_EVAL_COUNTS notin c");
return 0;
#endif
}
int get_xpath_streaming(){
printf("get_xpath_streaming in c");
#ifdef XPATH_STREAMING
printf("XPATH_STREAMING in c");
return 1;
#else
printf("XPATH_STREAMING notin c");
return 0;
#endif
}
int get_libxml_thread_enabled(){
printf("get_libxml_thread_enabled in c");
#ifdef LIBXML_THREAD_ENABLED
printf("LIBXML_THREAD_ENABLED in c");
return 1;
#else
printf("LIBXML_THREAD_ENABLED notin c");
return 0;
#endif
}
int get_libxml_xptr_enabled(){
printf("get_libxml_xptr_enabled in c");
#ifdef LIBXML_XPTR_ENABLED
printf("LIBXML_XPTR_ENABLED in c");
return 1;
#else
printf("LIBXML_XPTR_ENABLED notin c");
return 0;
#endif
}
int get_borlandc_or_msc_ver_and_msc_ver(){
#if defined(__BORLANDC__) || (defined(_MSC_VER) && (_MSC_VER == 1200))
return 1;
#else
return 0;
#endif
}
int get_xmlxpathnodesetsort(){
#ifdef xmlXPathNodeSetSort
return 1;
#else
return 0;
#endif
}
int get_gnuc(){
#ifdef __GNUC__
return 1;
#else
return 0;
#endif
}
int get_aix(){
#ifdef _AIX
return 1;
#else
return 0;
#endif
}
int get_debug_expr(){
#ifdef DEBUG_EXPR
return 1;
#else
return 0;
#endif
}
int get_libxml_docb_enabled(){
#ifdef LIBXML_DOCB_ENABLED
return 1;
#else
return 0;
#endif
}
int get_xp_default_cache_on(){
#ifdef XP_DEFAULT_CACHE_ON
return 1;
#else
return 0;
#endif
}
int get_xp_debug_obj_usage(){
#ifdef XP_DEBUG_OBJ_USAGE
return 1;
#else
return 0;
#endif
}
int get_xml_xml_namespace(){
#ifdef XML_XML_NAMESPACE
return 1;
#else
return 0;
#endif
}
int get_debug_or_debug_step(){
#if defined(DEBUG) || defined(DEBUG_STEP)
return 1;
#else
return 0;
#endif
}
int get_debug(){
#ifdef DEBUG
return 1;
#else
return 0;
#endif
}
int get_isnan(){
#ifdef isnan
return 1;
#else
return 0;
#endif
}
int get_isinf(){
#ifdef isinf
return 1;
#else
return 0;
#endif
}
int get_libxml_debug_enabled(){
#ifdef LIBXML_DEBUG_ENABLED
return 1;
#else
return 0;
#endif
}
int get_libxml_xpath_enabled_or_libxml_schemas_enabled(){
#if defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
return 1;
#else
return 0;
#endif
}
int get_libxml_xpath_enabled(){
#ifdef LIBXML_XPATH_ENABLED
return 1;
#else
return 0;
#endif
}
int get_debug_step(){
#ifdef DEBUG_STEP
return 1;
#else
return 0;
#endif
}
#if defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
/************************************************************************
* *
* Floating point stuff *
* *
************************************************************************/
double xmlXPathNAN;
double xmlXPathPINF;
double xmlXPathNINF;
/**
* xmlXPathInit:
*
* Initialize the XPath environment
*/
ATTRIBUTE_NO_SANITIZE("float-divide-by-zero")
void xmlXPathInit(void)
{
}
int xmlXPathIsNaN(double val)
{
return 0;
}
int xmlXPathIsInf(double val)
{
return 0;
}
#endif /* SCHEMAS or XPATH */
#ifdef LIBXML_XPATH_ENABLED
void xmlXPathErr(xmlXPathParserContextPtr ctxt, int error)
{
}
void xmlXPatherror(xmlXPathParserContextPtr ctxt, const char *file ATTRIBUTE_UNUSED,
int line ATTRIBUTE_UNUSED, int no)
{
}
void xmlXPathFreeCompExpr(xmlXPathCompExprPtr comp)
{
}
#ifdef LIBXML_DEBUG_ENABLED
void xmlXPathDebugDumpObject(FILE *output, xmlXPathObjectPtr cur, int depth)
{
}
void xmlXPathDebugDumpCompExpr(FILE *output, xmlXPathCompExprPtr comp,
int depth)
{
}
#endif /* LIBXML_DEBUG_ENABLED */
int xmlXPathContextSetCache(xmlXPathContextPtr ctxt,
int active,
int value,
int options)
{
return 0;
}
xmlXPathObjectPtr
valuePop(xmlXPathParserContextPtr ctxt)
{
return NULL;
}
int valuePush(xmlXPathParserContextPtr ctxt, xmlXPathObjectPtr value)
{
return 0;
}
int xmlXPathPopBoolean(xmlXPathParserContextPtr ctxt)
{
return 0;
}
double
xmlXPathPopNumber(xmlXPathParserContextPtr ctxt)
{
return 0;
}
xmlChar *
xmlXPathPopString(xmlXPathParserContextPtr ctxt)
{
return NULL;
}
xmlNodeSetPtr
xmlXPathPopNodeSet(xmlXPathParserContextPtr ctxt)
{
return NULL;
}
void *
xmlXPathPopExternal(xmlXPathParserContextPtr ctxt)
{
}
long xmlXPathOrderDocElems(xmlDocPtr doc)
{
return 0;
}
int xmlXPathCmpNodes(xmlNodePtr node1, xmlNodePtr node2)
{
return 0;
}
void xmlXPathNodeSetSort(xmlNodeSetPtr set)
{
}
void xmlXPathNodeSetFreeNs(xmlNsPtr ns)
{
}
xmlNodeSetPtr
xmlXPathNodeSetCreate(xmlNodePtr val)
{
return NULL;
}
int xmlXPathNodeSetContains(xmlNodeSetPtr cur, xmlNodePtr val)
{
return 0;
}
int xmlXPathNodeSetAddNs(xmlNodeSetPtr cur, xmlNodePtr node, xmlNsPtr ns)
{
return 0;
}
int xmlXPathNodeSetAdd(xmlNodeSetPtr cur, xmlNodePtr val)
{
return 0;
}
int xmlXPathNodeSetAddUnique(xmlNodeSetPtr cur, xmlNodePtr val)
{
return 0;
}
xmlNodeSetPtr
xmlXPathNodeSetMerge(xmlNodeSetPtr val1, xmlNodeSetPtr val2)
{
return NULL;
}
void xmlXPathNodeSetDel(xmlNodeSetPtr cur, xmlNodePtr val)
{
}
void xmlXPathNodeSetRemove(xmlNodeSetPtr cur, int val)
{
}
void xmlXPathFreeNodeSet(xmlNodeSetPtr obj)
{
}
#if defined(DEBUG) || defined(DEBUG_STEP)
void xmlGenericErrorContextNodeSet(FILE *output, xmlNodeSetPtr obj)
{
}
#endif
xmlXPathObjectPtr
xmlXPathNewNodeSet(xmlNodePtr val)
{
return NULL;
}
xmlXPathObjectPtr
xmlXPathNewValueTree(xmlNodePtr val)
{
return NULL;
}
xmlXPathObjectPtr
xmlXPathNewNodeSetList(xmlNodeSetPtr val)
{
return NULL;
}
xmlXPathObjectPtr
xmlXPathWrapNodeSet(xmlNodeSetPtr val)
{
return NULL;
}
void xmlXPathFreeNodeSetList(xmlXPathObjectPtr obj)
{
}
xmlNodeSetPtr
xmlXPathDifference(xmlNodeSetPtr nodes1, xmlNodeSetPtr nodes2)
{
return NULL;
}
xmlNodeSetPtr
xmlXPathIntersection(xmlNodeSetPtr nodes1, xmlNodeSetPtr nodes2)
{
return NULL;
}
xmlNodeSetPtr
xmlXPathDistinctSorted(xmlNodeSetPtr nodes)
{
return NULL;
}
xmlNodeSetPtr
xmlXPathDistinct(xmlNodeSetPtr nodes)
{
return NULL;
}
int xmlXPathHasSameNodes(xmlNodeSetPtr nodes1, xmlNodeSetPtr nodes2)
{
return 0;
}
xmlNodeSetPtr
xmlXPathNodeLeadingSorted(xmlNodeSetPtr nodes, xmlNodePtr node)
{
return NULL;
}
xmlNodeSetPtr
xmlXPathNodeLeading(xmlNodeSetPtr nodes, xmlNodePtr node)
{
return NULL;
}
xmlNodeSetPtr
xmlXPathLeadingSorted(xmlNodeSetPtr nodes1, xmlNodeSetPtr nodes2)
{
return NULL;
}
xmlNodeSetPtr
xmlXPathLeading(xmlNodeSetPtr nodes1, xmlNodeSetPtr nodes2)
{
return NULL;
}
xmlNodeSetPtr
xmlXPathNodeTrailingSorted(xmlNodeSetPtr nodes, xmlNodePtr node)
{
return NULL;
}
xmlNodeSetPtr
xmlXPathNodeTrailing(xmlNodeSetPtr nodes, xmlNodePtr node)
{
return NULL;
}
xmlNodeSetPtr
xmlXPathTrailingSorted(xmlNodeSetPtr nodes1, xmlNodeSetPtr nodes2)
{
return NULL;
}
xmlNodeSetPtr
xmlXPathTrailing(xmlNodeSetPtr nodes1, xmlNodeSetPtr nodes2)
{
return NULL;
}
int xmlXPathRegisterFunc(xmlXPathContextPtr ctxt, const xmlChar *name,
xmlXPathFunction f)
{
return 0;
}
int xmlXPathRegisterFuncNS(xmlXPathContextPtr ctxt, const xmlChar *name,
const xmlChar *ns_uri, xmlXPathFunction f)
{
return 0;
}
void xmlXPathRegisterFuncLookup(xmlXPathContextPtr ctxt,
xmlXPathFuncLookupFunc f,
void *funcCtxt)
{
}
xmlXPathFunction
xmlXPathFunctionLookup(xmlXPathContextPtr ctxt, const xmlChar *name)
{
return NULL;
}
xmlXPathFunction
xmlXPathFunctionLookupNS(xmlXPathContextPtr ctxt, const xmlChar *name,
const xmlChar *ns_uri)
{
return NULL;
}
void xmlXPathRegisteredFuncsCleanup(xmlXPathContextPtr ctxt)
{
}
int xmlXPathRegisterVariable(xmlXPathContextPtr ctxt, const xmlChar *name,
xmlXPathObjectPtr value)
{
return 0;
}
int xmlXPathRegisterVariableNS(xmlXPathContextPtr ctxt, const xmlChar *name,
const xmlChar *ns_uri,
xmlXPathObjectPtr value)
{
return 0;
}
void xmlXPathRegisterVariableLookup(xmlXPathContextPtr ctxt,
xmlXPathVariableLookupFunc f, void *data)
{
}
xmlXPathObjectPtr
xmlXPathVariableLookup(xmlXPathContextPtr ctxt, const xmlChar *name)
{
return NULL;
}
xmlXPathObjectPtr
xmlXPathVariableLookupNS(xmlXPathContextPtr ctxt, const xmlChar *name,
const xmlChar *ns_uri)
{
return NULL;
}
void xmlXPathRegisteredVariablesCleanup(xmlXPathContextPtr ctxt)
{
}
int xmlXPathRegisterNs(xmlXPathContextPtr ctxt, const xmlChar *prefix,
const xmlChar *ns_uri)
{
return 0;
}
const xmlChar *
xmlXPathNsLookup(xmlXPathContextPtr ctxt, const xmlChar *prefix)
{
return NULL;
}
void xmlXPathRegisteredNsCleanup(xmlXPathContextPtr ctxt)
{
}
xmlXPathObjectPtr
xmlXPathNewFloat(double val)
{
return NULL;
}
xmlXPathObjectPtr
xmlXPathNewBoolean(int val)
{
return NULL;
}
xmlXPathObjectPtr
xmlXPathNewString(const xmlChar *val)
{
return NULL;
}
xmlXPathObjectPtr
xmlXPathWrapString(xmlChar *val)
{
return NULL;
}
xmlXPathObjectPtr
xmlXPathNewCString(const char *val)
{
return NULL;
}
xmlXPathObjectPtr
xmlXPathWrapCString(char *val)
{
return NULL;
}
xmlXPathObjectPtr
xmlXPathWrapExternal(void *val)
{
return NULL;
}
xmlXPathObjectPtr
xmlXPathObjectCopy(xmlXPathObjectPtr val)
{
return NULL;
}
void xmlXPathFreeObject(xmlXPathObjectPtr obj)
{
}
xmlChar *
xmlXPathCastBooleanToString(int val)
{
return NULL;
}
xmlChar *
xmlXPathCastNumberToString(double val)
{
return NULL;
}
xmlChar *
xmlXPathCastNodeToString(xmlNodePtr node)
{
return NULL;
}
xmlChar *
xmlXPathCastNodeSetToString(xmlNodeSetPtr ns)
{
return NULL;
}
xmlChar *
xmlXPathCastToString(xmlXPathObjectPtr val)
{
return NULL;
}
xmlXPathObjectPtr
xmlXPathConvertString(xmlXPathObjectPtr val)
{
return NULL;
}
double
xmlXPathCastBooleanToNumber(int val)
{
return 0;
}
double
xmlXPathCastStringToNumber(const xmlChar *val)
{
return 0;
}
double
xmlXPathCastNodeToNumber(xmlNodePtr node)
{
return 0;
}
double
xmlXPathCastNodeSetToNumber(xmlNodeSetPtr ns)
{
return 0;
}
double
xmlXPathCastToNumber(xmlXPathObjectPtr val)
{
return 0;
}
xmlXPathObjectPtr
xmlXPathConvertNumber(xmlXPathObjectPtr val)
{
return NULL;
}
int xmlXPathCastNumberToBoolean(double val)
{
return 0;
}
int xmlXPathCastStringToBoolean(const xmlChar *val)
{
return 0;
}
int xmlXPathCastNodeSetToBoolean(xmlNodeSetPtr ns)
{
return 0;
}
int xmlXPathCastToBoolean(xmlXPathObjectPtr val)
{
return 0;
}
xmlXPathObjectPtr
xmlXPathConvertBoolean(xmlXPathObjectPtr val)
{
return NULL;
}
xmlXPathContextPtr
xmlXPathNewContext(xmlDocPtr doc)
{
return NULL;
}
void xmlXPathFreeContext(xmlXPathContextPtr ctxt)
{
}
xmlXPathParserContextPtr
xmlXPathNewParserContext(const xmlChar *str, xmlXPathContextPtr ctxt)
{
return NULL;
}
void xmlXPathFreeParserContext(xmlXPathParserContextPtr ctxt)
{
}
int xmlXPathEqualValues(xmlXPathParserContextPtr ctxt)
{
return 0;
}
int xmlXPathNotEqualValues(xmlXPathParserContextPtr ctxt)
{
return 0;
}
int xmlXPathCompareValues(xmlXPathParserContextPtr ctxt, int inf, int strict)
{
return 0;
}
void xmlXPathValueFlipSign(xmlXPathParserContextPtr ctxt)
{
}
void xmlXPathAddValues(xmlXPathParserContextPtr ctxt)
{
}
void xmlXPathSubValues(xmlXPathParserContextPtr ctxt)
{
}
void xmlXPathMultValues(xmlXPathParserContextPtr ctxt)
{
}
ATTRIBUTE_NO_SANITIZE("float-divide-by-zero")
void xmlXPathDivValues(xmlXPathParserContextPtr ctxt)
{
}
void xmlXPathModValues(xmlXPathParserContextPtr ctxt)
{
}
typedef xmlNodePtr (*xmlXPathTraversalFunction)(xmlXPathParserContextPtr ctxt, xmlNodePtr cur);
typedef xmlNodePtr (*xmlXPathTraversalFunctionExt)(xmlNodePtr cur, xmlNodePtr contextNode);
typedef xmlNodeSetPtr (*xmlXPathNodeSetMergeFunction)(xmlNodeSetPtr, xmlNodeSetPtr);
xmlNodePtr
xmlXPathNextSelf(xmlXPathParserContextPtr ctxt, xmlNodePtr cur)
{
return NULL;
}
xmlNodePtr
xmlXPathNextChild(xmlXPathParserContextPtr ctxt, xmlNodePtr cur)
{
return NULL;
}
xmlNodePtr
xmlXPathNextDescendant(xmlXPathParserContextPtr ctxt, xmlNodePtr cur)
{
return NULL;
}
xmlNodePtr
xmlXPathNextDescendantOrSelf(xmlXPathParserContextPtr ctxt, xmlNodePtr cur)
{
return NULL;
}
xmlNodePtr
xmlXPathNextParent(xmlXPathParserContextPtr ctxt, xmlNodePtr cur)
{
return NULL;
}
xmlNodePtr
xmlXPathNextAncestor(xmlXPathParserContextPtr ctxt, xmlNodePtr cur)
{
return NULL;
}
xmlNodePtr
xmlXPathNextAncestorOrSelf(xmlXPathParserContextPtr ctxt, xmlNodePtr cur)
{
return NULL;
}
xmlNodePtr
xmlXPathNextFollowingSibling(xmlXPathParserContextPtr ctxt, xmlNodePtr cur)
{
return NULL;
}
xmlNodePtr
xmlXPathNextPrecedingSibling(xmlXPathParserContextPtr ctxt, xmlNodePtr cur)
{
return NULL;
}
xmlNodePtr
xmlXPathNextFollowing(xmlXPathParserContextPtr ctxt, xmlNodePtr cur)
{
return NULL;
}
xmlNodePtr
xmlXPathNextPreceding(xmlXPathParserContextPtr ctxt, xmlNodePtr cur)
{
return NULL;
}
xmlNodePtr
xmlXPathNextNamespace(xmlXPathParserContextPtr ctxt, xmlNodePtr cur)
{
return NULL;
}
xmlNodePtr
xmlXPathNextAttribute(xmlXPathParserContextPtr ctxt, xmlNodePtr cur)
{
return NULL;
}
void xmlXPathRoot(xmlXPathParserContextPtr ctxt)
{
}
void xmlXPathLastFunction(xmlXPathParserContextPtr ctxt, int nargs)
{
}
void xmlXPathPositionFunction(xmlXPathParserContextPtr ctxt, int nargs)
{
}
void xmlXPathCountFunction(xmlXPathParserContextPtr ctxt, int nargs)
{
}
void xmlXPathIdFunction(xmlXPathParserContextPtr ctxt, int nargs)
{
}
void xmlXPathLocalNameFunction(xmlXPathParserContextPtr ctxt, int nargs)
{
}
void xmlXPathNamespaceURIFunction(xmlXPathParserContextPtr ctxt, int nargs)
{
}
void xmlXPathStringFunction(xmlXPathParserContextPtr ctxt, int nargs)
{
}
void xmlXPathStringLengthFunction(xmlXPathParserContextPtr ctxt, int nargs)
{
}
void xmlXPathConcatFunction(xmlXPathParserContextPtr ctxt, int nargs)
{
}
void xmlXPathContainsFunction(xmlXPathParserContextPtr ctxt, int nargs)
{
}
void xmlXPathStartsWithFunction(xmlXPathParserContextPtr ctxt, int nargs)
{
}
void xmlXPathSubstringFunction(xmlXPathParserContextPtr ctxt, int nargs)
{
}
void xmlXPathSubstringBeforeFunction(xmlXPathParserContextPtr ctxt, int nargs)
{
}
void xmlXPathSubstringAfterFunction(xmlXPathParserContextPtr ctxt, int nargs)
{
}
void xmlXPathNormalizeFunction(xmlXPathParserContextPtr ctxt, int nargs)
{
}
void xmlXPathTranslateFunction(xmlXPathParserContextPtr ctxt, int nargs)
{
}
void xmlXPathBooleanFunction(xmlXPathParserContextPtr ctxt, int nargs)
{
}
void xmlXPathNotFunction(xmlXPathParserContextPtr ctxt, int nargs)
{
}
void xmlXPathTrueFunction(xmlXPathParserContextPtr ctxt, int nargs)
{
}
void xmlXPathFalseFunction(xmlXPathParserContextPtr ctxt, int nargs)
{
}
void xmlXPathLangFunction(xmlXPathParserContextPtr ctxt, int nargs)
{
}
void xmlXPathNumberFunction(xmlXPathParserContextPtr ctxt, int nargs)
{
}
void xmlXPathSumFunction(xmlXPathParserContextPtr ctxt, int nargs)
{
}
void xmlXPathFloorFunction(xmlXPathParserContextPtr ctxt, int nargs)
{
}
void xmlXPathCeilingFunction(xmlXPathParserContextPtr ctxt, int nargs)
{
}
void xmlXPathRoundFunction(xmlXPathParserContextPtr ctxt, int nargs)
{
}
xmlChar *
xmlXPathParseNCName(xmlXPathParserContextPtr ctxt)
{
return NULL;
}
xmlChar *
xmlXPathParseName(xmlXPathParserContextPtr ctxt)
{
return NULL;
}
double
xmlXPathStringEvalNumber(const xmlChar *str)
{
return 0;
}
int xmlXPathIsNodeType(const xmlChar *name)
{
return 0;
}
int xmlXPathEvalPredicate(xmlXPathContextPtr ctxt, xmlXPathObjectPtr res)
{
return 0;
}
int xmlXPathEvaluatePredicateResult(xmlXPathParserContextPtr ctxt,
xmlXPathObjectPtr res)
{
return 0;
}
xmlXPathCompExprPtr
xmlXPathCtxtCompile(xmlXPathContextPtr ctxt, const xmlChar *str)
{
return NULL;
}
xmlXPathCompExprPtr
xmlXPathCompile(const xmlChar *str)
{
return NULL;
}
xmlXPathObjectPtr
xmlXPathCompiledEval(xmlXPathCompExprPtr comp, xmlXPathContextPtr ctx)
{
return NULL;
}
int xmlXPathCompiledEvalToBoolean(xmlXPathCompExprPtr comp,
xmlXPathContextPtr ctxt)
{
return 0;
}
void xmlXPathEvalExpr(xmlXPathParserContextPtr ctxt)
{
}
xmlXPathObjectPtr
xmlXPathEval(const xmlChar *str, xmlXPathContextPtr ctx)
{
return NULL;
}
int xmlXPathSetContextNode(xmlNodePtr node, xmlXPathContextPtr ctx)
{
return 0;
}
xmlXPathObjectPtr
xmlXPathNodeEval(xmlNodePtr node, const xmlChar *str, xmlXPathContextPtr ctx)
{
return NULL;
}
xmlXPathObjectPtr
xmlXPathEvalExpression(const xmlChar *str, xmlXPathContextPtr ctxt)
{
return NULL;
}
void xmlXPathRegisterAllFunctions(xmlXPathContextPtr ctxt)
{
}
#endif /* LIBXML_XPATH_ENABLED */
#endif /* COMPILE_WITH_RUST */
#define bottom_xpath
#include "elfgcchack.h"
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化