1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-10-21 14:53:44 +03:00

More cleanups, XSLT induced, start looking okay:

- xpath.[ch]: still a lot of cleanup based on XSLT, added
  xmlXPathConvert{String,Number,Boolean} to be able to make
  type casts without a context stack, fixed some implementation
  problems related to the absence of context at parse-time,
  added xmlXPathEvalPredicate() and xmlXPathFreeCompExpr()
  in the public API too
- xpointer.c xpathInternals.h: we need to know at parse time
  whether we are compiling an XPointer
Daniel
This commit is contained in:
Daniel Veillard
2001-03-19 15:58:54 +00:00
parent afcbe1cb12
commit fbf8a2d0c8
5 changed files with 289 additions and 126 deletions

View File

@@ -244,7 +244,7 @@ struct _xmlXPathParserContext {
xmlXPathObjectPtr *valueTab; /* stack of values */
xmlXPathCompExprPtr comp; /* the precompiled expression */
int xptr; /* it this an XPointer expression */
};
/*
@@ -271,6 +271,12 @@ void xmlXPathFreeNodeSet (xmlNodeSetPtr obj);
xmlXPathObjectPtr xmlXPathObjectCopy (xmlXPathObjectPtr val);
int xmlXPathCmpNodes (xmlNodePtr node1,
xmlNodePtr node2);
/**
* Conversion functions to basic types
*/
xmlXPathObjectPtr xmlXPathConvertBoolean (xmlXPathObjectPtr val);
xmlXPathObjectPtr xmlXPathConvertNumber (xmlXPathObjectPtr val);
xmlXPathObjectPtr xmlXPathConvertString (xmlXPathObjectPtr val);
/**
* Context handling
@@ -288,13 +294,15 @@ xmlXPathObjectPtr xmlXPathEvalXPtrExpr (const xmlChar *str,
xmlXPathContextPtr ctxt);
xmlXPathObjectPtr xmlXPathEvalExpression (const xmlChar *str,
xmlXPathContextPtr ctxt);
int xmlXPathEvalPredicate (xmlXPathContextPtr ctxt,
xmlXPathObjectPtr res);
/**
* Separate compilation/evaluation entry points
*/
xmlXPathCompExprPtr xmlXPathCompile (const xmlChar *str);
xmlXPathObjectPtr xmlXPathCompiledEval (xmlXPathCompExprPtr comp,
xmlXPathContextPtr ctx);
void xmlXPathFreeCompExpr (xmlXPathCompExprPtr comp);
#ifdef __cplusplus
}
#endif