* 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. */
| 1297 | * Returns the xmlXPathContext just allocated. |
| 1298 | */ |
| 1299 | xmlXPathContextPtr |
| 1300 | xmlXPtrNewContext(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: |
no test coverage detected