1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-07-30 22:43:14 +03:00

Rewrite/cleanup/tests of URI normalization:

- uri.c: rewrite of xmlNormalizeURIPath from Paul D. Smith
- test/URI/smith.uri result/URI/smith.uri Makefile.am:
  added the new tests for URI normalization
- testURI.c: fixed stoopid bugs
- result/VC/OneID3 result/VC/UniqueElementTypeDeclaration:
  the URI in the error messages are now properly normalized
Daniel
This commit is contained in:
Daniel Veillard
2001-02-02 17:07:32 +00:00
parent ea28ce621c
commit b6e7fdbac6
9 changed files with 259 additions and 26 deletions

View File

@ -27,11 +27,8 @@ int main(int argc, char **argv) {
const char *base = NULL;
xmlChar *composite;
if (argv[arg] == NULL) {
printf("Usage: %s [-base URI] URI ...\n", argv[0]);
exit(0);
}
if ((!strcmp(argv[arg], "-base")) || (!strcmp(argv[arg], "--base"))) {
if ((argv[arg] != NULL) &&
((!strcmp(argv[arg], "-base")) || (!strcmp(argv[arg], "--base")))) {
arg++;
base = argv[arg];
if (base != NULL)
@ -64,6 +61,7 @@ int main(int argc, char **argv) {
if (ret != 0)
printf("%s : error %d\n", str, ret);
else {
xmlNormalizeURIPath(uri->path);
xmlPrintURI(stdout, uri);
printf("\n");
}
@ -99,5 +97,5 @@ int main(int argc, char **argv) {
}
xmlFreeURI(uri);
xmlMemoryDump();
exit(0);
return(0);
}