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

Function xmlXPtrNewContext

ThirdParty/libxml2/vtklibxml2/xpointer.c:1299–1330  ·  view source on GitHub ↗

* xmlXPtrNewContext: * @doc: the XML document * @here: the node that directly contains the XPointer being evaluated or NULL * @origin: the element from which a user or program initiated traversal of * the link, or NULL. * * Create a new XPointer context * * Returns the xmlXPathContext just allocated. */

Source from the content-addressed store, hash-verified

1297 * Returns the xmlXPathContext just allocated.
1298 */
1299xmlXPathContextPtr
1300xmlXPtrNewContext(xmlDocPtr doc, xmlNodePtr here, xmlNodePtr origin) {
1301 xmlXPathContextPtr ret;
1302 (void) here;
1303 (void) origin;
1304
1305 ret = xmlXPathNewContext(doc);
1306 if (ret == NULL)
1307 return(ret);
1308#ifdef LIBXML_XPTR_LOCS_ENABLED
1309 ret->xptr = 1;
1310 ret->here = here;
1311 ret->origin = origin;
1312
1313 xmlXPathRegisterFunc(ret, (xmlChar *)"range",
1314 xmlXPtrRangeFunction);
1315 xmlXPathRegisterFunc(ret, (xmlChar *)"range-inside",
1316 xmlXPtrRangeInsideFunction);
1317 xmlXPathRegisterFunc(ret, (xmlChar *)"string-range",
1318 xmlXPtrStringRangeFunction);
1319 xmlXPathRegisterFunc(ret, (xmlChar *)"start-point",
1320 xmlXPtrStartPointFunction);
1321 xmlXPathRegisterFunc(ret, (xmlChar *)"end-point",
1322 xmlXPtrEndPointFunction);
1323 xmlXPathRegisterFunc(ret, (xmlChar *)"here",
1324 xmlXPtrHereFunction);
1325 xmlXPathRegisterFunc(ret, (xmlChar *)" origin",
1326 xmlXPtrOriginFunction);
1327#endif /* LIBXML_XPTR_LOCS_ENABLED */
1328
1329 return(ret);
1330}
1331
1332/**
1333 * xmlXPtrEval:

Callers 5

openFileMethod · 0.85
parseMethod · 0.85
readSingleNodeMethod · 0.85
xmlXIncludeLoadDocFunction · 0.85
runtest.cFile · 0.85

Calls 2

xmlXPathNewContextFunction · 0.85
xmlXPathRegisterFuncFunction · 0.85

Tested by

no test coverage detected