[xml] [PATCH] anyURI fixes
- From: John Belmonte <john neggie net>
- To: xml gnome org
- Cc: Anthony Carrico <acarrico memebeam org>
- Subject: [xml] [PATCH] anyURI fixes
- Date: Sun, 14 Mar 2004 02:13:45 -0500
Hello,
Patch "a" adds support for schema values of type anyURI. Patch "b" does
the same and fixes bug <http://bugzilla.gnome.org/show_bug.cgi?id=136072>.
Regards,
-John
--
http:// if ile.org/
--- xmlschemastypes.c.orig 2004-03-14 01:38:14.000000000 -0500
+++ xmlschemastypes.c 2004-03-14 01:44:46.000000000 -0500
@@ -2006,10 +2006,15 @@
uri = xmlParseURI((const char *) value);
if (uri == NULL)
goto return1;
+ xmlFreeURI(uri);
+
if (val != NULL) {
- TODO;
+ v = xmlSchemaNewValue(XML_SCHEMAS_ANYURI);
+ if (v == NULL)
+ goto error;
+ v->value.str = xmlStrdup(value);
+ *val = v;
}
- xmlFreeURI(uri);
goto return0;
}
case XML_SCHEMAS_HEXBINARY:{
--- xmlschemastypes.c.orig 2004-03-14 01:38:14.000000000 -0500
+++ xmlschemastypes.c 2004-03-14 01:38:36.000000000 -0500
@@ -2001,15 +2001,20 @@
goto done;
}
case XML_SCHEMAS_ANYURI:{
- xmlURIPtr uri;
+ if (*value != 0) {
+ xmlURIPtr uri = xmlParseURI((const char *) value);
+ if (uri == NULL)
+ goto return1;
+ xmlFreeURI(uri);
+ }
- uri = xmlParseURI((const char *) value);
- if (uri == NULL)
- goto return1;
if (val != NULL) {
- TODO;
+ v = xmlSchemaNewValue(XML_SCHEMAS_ANYURI);
+ if (v == NULL)
+ goto error;
+ v->value.str = xmlStrdup(value);
+ *val = v;
}
- xmlFreeURI(uri);
goto return0;
}
case XML_SCHEMAS_HEXBINARY:{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]