MCPcopy Create free account
hub / github.com/Kitware/VTK / xmlXPathPositionFunction

Function xmlXPathPositionFunction

ThirdParty/libxml2/vtklibxml2/xpath.c:7448–7457  ·  view source on GitHub ↗

* 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(). */

Source from the content-addressed store, hash-verified

7446 * will be equal to last().
7447 */
7448void
7449xmlXPathPositionFunction(xmlXPathParserContextPtr ctxt, int nargs) {
7450 CHECK_ARITY(0);
7451 if (ctxt->context->proximityPosition >= 0) {
7452 valuePush(ctxt, xmlXPathCacheNewFloat(ctxt,
7453 (double) ctxt->context->proximityPosition));
7454 } else {
7455 XP_ERROR(XPATH_INVALID_CTXT_POSITION);
7456 }
7457}
7458
7459/**
7460 * xmlXPathCountFunction:

Callers

nothing calls this directly

Calls 2

valuePushFunction · 0.85
xmlXPathCacheNewFloatFunction · 0.85

Tested by

no test coverage detected