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

Function xmlSchemaBuildAbsoluteURI

ThirdParty/libxml2/vtklibxml2/xmlschemas.c:10207–10236  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10205
10206
10207static const xmlChar *
10208xmlSchemaBuildAbsoluteURI(xmlDictPtr dict, const xmlChar* location,
10209 xmlNodePtr ctxtNode)
10210{
10211 /*
10212 * Build an absolute location URI.
10213 */
10214 if (location != NULL) {
10215 if (ctxtNode == NULL)
10216 return(location);
10217 else {
10218 xmlChar *base, *URI;
10219 const xmlChar *ret = NULL;
10220
10221 base = xmlNodeGetBase(ctxtNode->doc, ctxtNode);
10222 if (base == NULL) {
10223 URI = xmlBuildURI(location, ctxtNode->doc->URL);
10224 } else {
10225 URI = xmlBuildURI(location, base);
10226 xmlFree(base);
10227 }
10228 if (URI != NULL) {
10229 ret = xmlDictLookup(dict, URI, -1);
10230 xmlFree(URI);
10231 return(ret);
10232 }
10233 }
10234 }
10235 return(NULL);
10236}
10237
10238
10239

Callers 2

xmlSchemaParseImportFunction · 0.85

Calls 3

xmlNodeGetBaseFunction · 0.85
xmlBuildURIFunction · 0.85
xmlDictLookupFunction · 0.85

Tested by

no test coverage detected