* C-API: Added xpath_first_localonly() as an xpath function that skips prefix and namespace checks.

* Added experimental code for optizing XPath search using binary search.
  * Enable with XPATH_LIST_OPTIMIZE
* Changed `clicon_rpc_generate_error(msg, xerr)` to `clicon_rpc_generate_error(xerr, msg, arg)`
This commit is contained in:
Olof hagsand 2019-12-20 18:21:46 +01:00
parent ab46ce9820
commit 7ad16bd84b
56 changed files with 602 additions and 227 deletions

View file

@ -88,7 +88,7 @@ changelog_rename(clicon_handle h,
clicon_err(OE_XML, 0, "tag required");
goto done;
}
if (xpath_vec_ctx(xw, nsc, tag, &xctx) < 0)
if (xpath_vec_ctx(xw, nsc, tag, 0, &xctx) < 0)
goto done;
if (ctx2string(xctx, &str) < 0)
goto done;
@ -258,7 +258,7 @@ changelog_op(clicon_handle h,
xw = wvec[i];
/* If 'when' exists and is false, skip this target */
if (whenxpath){
if (xpath_vec_ctx(xw, nsc, whenxpath, &xctx) < 0)
if (xpath_vec_ctx(xw, nsc, whenxpath, 0, &xctx) < 0)
goto done;
if ((ret = ctx2boolean(xctx)) < 0)
goto done;