| 10205 | |
| 10206 | |
| 10207 | static const xmlChar * |
| 10208 | xmlSchemaBuildAbsoluteURI(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 |
no test coverage detected