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

Function xmlXPathVariableLookupNS

ThirdParty/libxml2/vtklibxml2/xpath.c:4159–4179  ·  view source on GitHub ↗

* xmlXPathVariableLookupNS: * @ctxt: the XPath context * @name: the variable name * @ns_uri: the variable namespace URI * * Search in the Variable array of the context for the given * variable value. * * Returns the a copy of the value or NULL if not found */

Source from the content-addressed store, hash-verified

4157 * Returns the a copy of the value or NULL if not found
4158 */
4159xmlXPathObjectPtr
4160xmlXPathVariableLookupNS(xmlXPathContextPtr ctxt, const xmlChar *name,
4161 const xmlChar *ns_uri) {
4162 if (ctxt == NULL)
4163 return(NULL);
4164
4165 if (ctxt->varLookupFunc != NULL) {
4166 xmlXPathObjectPtr ret;
4167
4168 ret = ((xmlXPathVariableLookupFunc)ctxt->varLookupFunc)
4169 (ctxt->varLookupData, name, ns_uri);
4170 if (ret != NULL) return(ret);
4171 }
4172
4173 if (ctxt->varHash == NULL)
4174 return(NULL);
4175 if (name == NULL)
4176 return(NULL);
4177
4178 return(xmlXPathObjectCopy(xmlHashLookup2(ctxt->varHash, name, ns_uri)));
4179}
4180
4181/**
4182 * xmlXPathRegisteredVariablesCleanup:

Callers 2

xmlXPathVariableLookupFunction · 0.85
xmlXPathCompOpEvalFunction · 0.85

Calls 2

xmlXPathObjectCopyFunction · 0.85
xmlHashLookup2Function · 0.85

Tested by

no test coverage detected