• Home
  • Raw
  • Download

Lines Matching refs:uri

21 static void xmlCleanURI(xmlURIPtr uri);
177 xmlParse3986Scheme(xmlURIPtr uri, const char **str) { in xmlParse3986Scheme() argument
189 if (uri != NULL) { in xmlParse3986Scheme()
190 if (uri->scheme != NULL) xmlFree(uri->scheme); in xmlParse3986Scheme()
191 uri->scheme = STRNDUP(*str, cur - *str); in xmlParse3986Scheme()
213 xmlParse3986Fragment(xmlURIPtr uri, const char **str) in xmlParse3986Fragment() argument
224 ((uri != NULL) && (uri->cleanup & 1) && (IS_UNWISE(cur)))) in xmlParse3986Fragment()
226 if (uri != NULL) { in xmlParse3986Fragment()
227 if (uri->fragment != NULL) in xmlParse3986Fragment()
228 xmlFree(uri->fragment); in xmlParse3986Fragment()
229 if (uri->cleanup & 2) in xmlParse3986Fragment()
230 uri->fragment = STRNDUP(*str, cur - *str); in xmlParse3986Fragment()
232 uri->fragment = xmlURIUnescapeString(*str, cur - *str, NULL); in xmlParse3986Fragment()
250 xmlParse3986Query(xmlURIPtr uri, const char **str) in xmlParse3986Query() argument
260 ((uri != NULL) && (uri->cleanup & 1) && (IS_UNWISE(cur)))) in xmlParse3986Query()
262 if (uri != NULL) { in xmlParse3986Query()
263 if (uri->query != NULL) in xmlParse3986Query()
264 xmlFree(uri->query); in xmlParse3986Query()
265 if (uri->cleanup & 2) in xmlParse3986Query()
266 uri->query = STRNDUP(*str, cur - *str); in xmlParse3986Query()
268 uri->query = xmlURIUnescapeString(*str, cur - *str, NULL); in xmlParse3986Query()
273 if (uri->query_raw != NULL) in xmlParse3986Query()
274 xmlFree (uri->query_raw); in xmlParse3986Query()
275 uri->query_raw = STRNDUP (*str, cur - *str); in xmlParse3986Query()
294 xmlParse3986Port(xmlURIPtr uri, const char **str) in xmlParse3986Port() argument
299 if (uri != NULL) in xmlParse3986Port()
300 uri->port = 0; in xmlParse3986Port()
302 if (uri != NULL) in xmlParse3986Port()
303 uri->port = uri->port * 10 + (*cur - '0'); in xmlParse3986Port()
325 xmlParse3986Userinfo(xmlURIPtr uri, const char **str) in xmlParse3986Userinfo() argument
334 if (uri != NULL) { in xmlParse3986Userinfo()
335 if (uri->user != NULL) xmlFree(uri->user); in xmlParse3986Userinfo()
336 if (uri->cleanup & 2) in xmlParse3986Userinfo()
337 uri->user = STRNDUP(*str, cur - *str); in xmlParse3986Userinfo()
339 uri->user = xmlURIUnescapeString(*str, cur - *str, NULL); in xmlParse3986Userinfo()
400 xmlParse3986Host(xmlURIPtr uri, const char **str) in xmlParse3986Host() argument
447 if (uri != NULL) { in xmlParse3986Host()
448 if (uri->authority != NULL) xmlFree(uri->authority); in xmlParse3986Host()
449 uri->authority = NULL; in xmlParse3986Host()
450 if (uri->server != NULL) xmlFree(uri->server); in xmlParse3986Host()
452 if (uri->cleanup & 2) in xmlParse3986Host()
453 uri->server = STRNDUP(host, cur - host); in xmlParse3986Host()
455 uri->server = xmlURIUnescapeString(host, cur - host, NULL); in xmlParse3986Host()
457 uri->server = NULL; in xmlParse3986Host()
476 xmlParse3986Authority(xmlURIPtr uri, const char **str) in xmlParse3986Authority() argument
485 ret = xmlParse3986Userinfo(uri, &cur); in xmlParse3986Authority()
490 ret = xmlParse3986Host(uri, &cur); in xmlParse3986Authority()
494 ret = xmlParse3986Port(uri, &cur); in xmlParse3986Authority()
547 xmlParse3986PathAbEmpty(xmlURIPtr uri, const char **str) in xmlParse3986PathAbEmpty() argument
559 if (uri != NULL) { in xmlParse3986PathAbEmpty()
560 if (uri->path != NULL) xmlFree(uri->path); in xmlParse3986PathAbEmpty()
562 if (uri->cleanup & 2) in xmlParse3986PathAbEmpty()
563 uri->path = STRNDUP(*str, cur - *str); in xmlParse3986PathAbEmpty()
565 uri->path = xmlURIUnescapeString(*str, cur - *str, NULL); in xmlParse3986PathAbEmpty()
567 uri->path = NULL; in xmlParse3986PathAbEmpty()
587 xmlParse3986PathAbsolute(xmlURIPtr uri, const char **str) in xmlParse3986PathAbsolute() argument
605 if (uri != NULL) { in xmlParse3986PathAbsolute()
606 if (uri->path != NULL) xmlFree(uri->path); in xmlParse3986PathAbsolute()
608 if (uri->cleanup & 2) in xmlParse3986PathAbsolute()
609 uri->path = STRNDUP(*str, cur - *str); in xmlParse3986PathAbsolute()
611 uri->path = xmlURIUnescapeString(*str, cur - *str, NULL); in xmlParse3986PathAbsolute()
613 uri->path = NULL; in xmlParse3986PathAbsolute()
633 xmlParse3986PathRootless(xmlURIPtr uri, const char **str) in xmlParse3986PathRootless() argument
647 if (uri != NULL) { in xmlParse3986PathRootless()
648 if (uri->path != NULL) xmlFree(uri->path); in xmlParse3986PathRootless()
650 if (uri->cleanup & 2) in xmlParse3986PathRootless()
651 uri->path = STRNDUP(*str, cur - *str); in xmlParse3986PathRootless()
653 uri->path = xmlURIUnescapeString(*str, cur - *str, NULL); in xmlParse3986PathRootless()
655 uri->path = NULL; in xmlParse3986PathRootless()
675 xmlParse3986PathNoScheme(xmlURIPtr uri, const char **str) in xmlParse3986PathNoScheme() argument
689 if (uri != NULL) { in xmlParse3986PathNoScheme()
690 if (uri->path != NULL) xmlFree(uri->path); in xmlParse3986PathNoScheme()
692 if (uri->cleanup & 2) in xmlParse3986PathNoScheme()
693 uri->path = STRNDUP(*str, cur - *str); in xmlParse3986PathNoScheme()
695 uri->path = xmlURIUnescapeString(*str, cur - *str, NULL); in xmlParse3986PathNoScheme()
697 uri->path = NULL; in xmlParse3986PathNoScheme()
720 xmlParse3986HierPart(xmlURIPtr uri, const char **str) in xmlParse3986HierPart() argument
729 ret = xmlParse3986Authority(uri, &cur); in xmlParse3986HierPart()
731 ret = xmlParse3986PathAbEmpty(uri, &cur); in xmlParse3986HierPart()
736 ret = xmlParse3986PathAbsolute(uri, &cur); in xmlParse3986HierPart()
739 ret = xmlParse3986PathRootless(uri, &cur); in xmlParse3986HierPart()
743 if (uri != NULL) { in xmlParse3986HierPart()
744 if (uri->path != NULL) xmlFree(uri->path); in xmlParse3986HierPart()
745 uri->path = NULL; in xmlParse3986HierPart()
769 xmlParse3986RelativeRef(xmlURIPtr uri, const char *str) { in xmlParse3986RelativeRef() argument
774 ret = xmlParse3986Authority(uri, &str); in xmlParse3986RelativeRef()
776 ret = xmlParse3986PathAbEmpty(uri, &str); in xmlParse3986RelativeRef()
779 ret = xmlParse3986PathAbsolute(uri, &str); in xmlParse3986RelativeRef()
782 ret = xmlParse3986PathNoScheme(uri, &str); in xmlParse3986RelativeRef()
786 if (uri != NULL) { in xmlParse3986RelativeRef()
787 if (uri->path != NULL) xmlFree(uri->path); in xmlParse3986RelativeRef()
788 uri->path = NULL; in xmlParse3986RelativeRef()
794 ret = xmlParse3986Query(uri, &str); in xmlParse3986RelativeRef()
799 ret = xmlParse3986Fragment(uri, &str); in xmlParse3986RelativeRef()
803 xmlCleanURI(uri); in xmlParse3986RelativeRef()
823 xmlParse3986URI(xmlURIPtr uri, const char *str) { in xmlParse3986URI() argument
826 ret = xmlParse3986Scheme(uri, &str); in xmlParse3986URI()
832 ret = xmlParse3986HierPart(uri, &str); in xmlParse3986URI()
836 ret = xmlParse3986Query(uri, &str); in xmlParse3986URI()
841 ret = xmlParse3986Fragment(uri, &str); in xmlParse3986URI()
845 xmlCleanURI(uri); in xmlParse3986URI()
864 xmlParse3986URIReference(xmlURIPtr uri, const char *str) { in xmlParse3986URIReference() argument
869 xmlCleanURI(uri); in xmlParse3986URIReference()
875 ret = xmlParse3986URI(uri, str); in xmlParse3986URIReference()
877 xmlCleanURI(uri); in xmlParse3986URIReference()
878 ret = xmlParse3986RelativeRef(uri, str); in xmlParse3986URIReference()
880 xmlCleanURI(uri); in xmlParse3986URIReference()
899 xmlURIPtr uri; in xmlParseURI() local
904 uri = xmlCreateURI(); in xmlParseURI()
905 if (uri != NULL) { in xmlParseURI()
906 ret = xmlParse3986URIReference(uri, str); in xmlParseURI()
908 xmlFreeURI(uri); in xmlParseURI()
912 return(uri); in xmlParseURI()
928 xmlParseURIReference(xmlURIPtr uri, const char *str) { in xmlParseURIReference() argument
929 return(xmlParse3986URIReference(uri, str)); in xmlParseURIReference()
945 xmlURIPtr uri; in xmlParseURIRaw() local
950 uri = xmlCreateURI(); in xmlParseURIRaw()
951 if (uri != NULL) { in xmlParseURIRaw()
953 uri->cleanup |= 2; in xmlParseURIRaw()
955 ret = xmlParseURIReference(uri, str); in xmlParseURIRaw()
957 xmlFreeURI(uri); in xmlParseURIRaw()
961 return(uri); in xmlParseURIRaw()
1000 xmlSaveUri(xmlURIPtr uri) { in xmlSaveUri() argument
1007 if (uri == NULL) return(NULL); in xmlSaveUri()
1019 if (uri->scheme != NULL) { in xmlSaveUri()
1020 p = uri->scheme; in xmlSaveUri()
1048 if (uri->opaque != NULL) { in xmlSaveUri()
1049 p = uri->opaque; in xmlSaveUri()
1073 if (uri->server != NULL) { in xmlSaveUri()
1087 if (uri->user != NULL) { in xmlSaveUri()
1088 p = uri->user; in xmlSaveUri()
1130 p = uri->server; in xmlSaveUri()
1146 if (uri->port > 0) { in xmlSaveUri()
1159 len += snprintf((char *) &ret[len], max - len, ":%d", uri->port); in xmlSaveUri()
1161 } else if (uri->authority != NULL) { in xmlSaveUri()
1176 p = uri->authority; in xmlSaveUri()
1203 } else if (uri->scheme != NULL) { in xmlSaveUri()
1219 if (uri->path != NULL) { in xmlSaveUri()
1220 p = uri->path; in xmlSaveUri()
1225 if ((uri->scheme != NULL) && in xmlSaveUri()
1230 (xmlStrEqual(BAD_CAST uri->scheme, BAD_CAST "file"))) { in xmlSaveUri()
1272 if (uri->query_raw != NULL) { in xmlSaveUri()
1286 p = uri->query_raw; in xmlSaveUri()
1302 } else if (uri->query != NULL) { in xmlSaveUri()
1316 p = uri->query; in xmlSaveUri()
1342 if (uri->fragment != NULL) { in xmlSaveUri()
1356 p = uri->fragment; in xmlSaveUri()
1404 xmlPrintURI(FILE *stream, xmlURIPtr uri) { in xmlPrintURI() argument
1407 out = xmlSaveUri(uri); in xmlPrintURI()
1421 xmlCleanURI(xmlURIPtr uri) { in xmlCleanURI() argument
1422 if (uri == NULL) return; in xmlCleanURI()
1424 if (uri->scheme != NULL) xmlFree(uri->scheme); in xmlCleanURI()
1425 uri->scheme = NULL; in xmlCleanURI()
1426 if (uri->server != NULL) xmlFree(uri->server); in xmlCleanURI()
1427 uri->server = NULL; in xmlCleanURI()
1428 if (uri->user != NULL) xmlFree(uri->user); in xmlCleanURI()
1429 uri->user = NULL; in xmlCleanURI()
1430 if (uri->path != NULL) xmlFree(uri->path); in xmlCleanURI()
1431 uri->path = NULL; in xmlCleanURI()
1432 if (uri->fragment != NULL) xmlFree(uri->fragment); in xmlCleanURI()
1433 uri->fragment = NULL; in xmlCleanURI()
1434 if (uri->opaque != NULL) xmlFree(uri->opaque); in xmlCleanURI()
1435 uri->opaque = NULL; in xmlCleanURI()
1436 if (uri->authority != NULL) xmlFree(uri->authority); in xmlCleanURI()
1437 uri->authority = NULL; in xmlCleanURI()
1438 if (uri->query != NULL) xmlFree(uri->query); in xmlCleanURI()
1439 uri->query = NULL; in xmlCleanURI()
1440 if (uri->query_raw != NULL) xmlFree(uri->query_raw); in xmlCleanURI()
1441 uri->query_raw = NULL; in xmlCleanURI()
1451 xmlFreeURI(xmlURIPtr uri) { in xmlFreeURI() argument
1452 if (uri == NULL) return; in xmlFreeURI()
1454 if (uri->scheme != NULL) xmlFree(uri->scheme); in xmlFreeURI()
1455 if (uri->server != NULL) xmlFree(uri->server); in xmlFreeURI()
1456 if (uri->user != NULL) xmlFree(uri->user); in xmlFreeURI()
1457 if (uri->path != NULL) xmlFree(uri->path); in xmlFreeURI()
1458 if (uri->fragment != NULL) xmlFree(uri->fragment); in xmlFreeURI()
1459 if (uri->opaque != NULL) xmlFree(uri->opaque); in xmlFreeURI()
1460 if (uri->authority != NULL) xmlFree(uri->authority); in xmlFreeURI()
1461 if (uri->query != NULL) xmlFree(uri->query); in xmlFreeURI()
1462 if (uri->query_raw != NULL) xmlFree(uri->query_raw); in xmlFreeURI()
1463 xmlFree(uri); in xmlFreeURI()
1822 xmlURIPtr uri; in xmlURIEscape() local
1828 xmlFreeURI(uri); \ in xmlURIEscape()
1834 uri = xmlCreateURI(); in xmlURIEscape()
1835 if (uri != NULL) { in xmlURIEscape()
1839 uri->cleanup = 1; in xmlURIEscape()
1840 ret2 = xmlParseURIReference(uri, (const char *)str); in xmlURIEscape()
1842 xmlFreeURI(uri); in xmlURIEscape()
1847 if (!uri) in xmlURIEscape()
1852 if (uri->scheme) { in xmlURIEscape()
1853 segment = xmlURIEscapeStr(BAD_CAST uri->scheme, BAD_CAST "+-."); in xmlURIEscape()
1860 if (uri->authority) { in xmlURIEscape()
1862 xmlURIEscapeStr(BAD_CAST uri->authority, BAD_CAST "/?;:@"); in xmlURIEscape()
1869 if (uri->user) { in xmlURIEscape()
1870 segment = xmlURIEscapeStr(BAD_CAST uri->user, BAD_CAST ";:&=+$,"); in xmlURIEscape()
1878 if (uri->server) { in xmlURIEscape()
1879 segment = xmlURIEscapeStr(BAD_CAST uri->server, BAD_CAST "/?;:@"); in xmlURIEscape()
1881 if (uri->user == NULL) in xmlURIEscape()
1887 if (uri->port) { in xmlURIEscape()
1890 snprintf((char *) port, 10, "%d", uri->port); in xmlURIEscape()
1895 if (uri->path) { in xmlURIEscape()
1897 xmlURIEscapeStr(BAD_CAST uri->path, BAD_CAST ":@&=+$,/?;"); in xmlURIEscape()
1903 if (uri->query_raw) { in xmlURIEscape()
1905 ret = xmlStrcat(ret, BAD_CAST uri->query_raw); in xmlURIEscape()
1907 else if (uri->query) { in xmlURIEscape()
1909 xmlURIEscapeStr(BAD_CAST uri->query, BAD_CAST ";/?:@&=+,$"); in xmlURIEscape()
1916 if (uri->opaque) { in xmlURIEscape()
1917 segment = xmlURIEscapeStr(BAD_CAST uri->opaque, BAD_CAST ""); in xmlURIEscape()
1923 if (uri->fragment) { in xmlURIEscape()
1924 segment = xmlURIEscapeStr(BAD_CAST uri->fragment, BAD_CAST "#"); in xmlURIEscape()
1931 xmlFreeURI(uri); in xmlURIEscape()
2475 xmlURIPtr uri; in xmlCanonicPath() local
2486 if ((uri = xmlParseURI((const char *) path)) != NULL) { in xmlCanonicPath()
2487 xmlFreeURI(uri); in xmlCanonicPath()
2518 uri = xmlParseURI((const char *) escURI); in xmlCanonicPath()
2520 if (uri != NULL) { in xmlCanonicPath()
2521 xmlFreeURI(uri); in xmlCanonicPath()
2533 uri = xmlCreateURI(); in xmlCanonicPath()
2534 if (uri == NULL) { /* Guard against 'out of memory' */ in xmlCanonicPath()
2541 uri->scheme = xmlStrdup(BAD_CAST "file"); in xmlCanonicPath()
2543 uri->path = xmlMallocAtomic(len + 2); in xmlCanonicPath()
2544 if (uri->path == NULL) { in xmlCanonicPath()
2545 xmlFreeURI(uri); /* Guard agains 'out of memory' */ in xmlCanonicPath()
2549 uri->path[0] = '/'; in xmlCanonicPath()
2550 p = uri->path + 1; in xmlCanonicPath()
2553 uri->path = xmlStrdup(path); in xmlCanonicPath()
2554 if (uri->path == NULL) { in xmlCanonicPath()
2555 xmlFreeURI(uri); in xmlCanonicPath()
2558 p = uri->path; in xmlCanonicPath()
2567 if (uri->scheme == NULL) { in xmlCanonicPath()
2568 ret = xmlStrdup((const xmlChar *) uri->path); in xmlCanonicPath()
2570 ret = xmlSaveUri(uri); in xmlCanonicPath()
2573 xmlFreeURI(uri); in xmlCanonicPath()
2594 xmlURIPtr uri; in xmlPathToURI() local
2601 if ((uri = xmlParseURI((const char *) path)) != NULL) { in xmlPathToURI()
2602 xmlFreeURI(uri); in xmlPathToURI()
2612 if ((uri = xmlParseURI((const char *) cal)) != NULL) { in xmlPathToURI()
2613 xmlFreeURI(uri); in xmlPathToURI()