Aaaannnd putting back the previous changes done by Daniel, which I
* xmlschemastypes.c: Aaaannnd putting back the previous changes done
by Daniel, which I overwrote with the previous commit.
diff --git a/ChangeLog b/ChangeLog
index ec79f46..cd1d140 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Wed Mar 16 17:37:04 CET 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xmlschemastypes.c: Aaaannnd putting back the previous changes done
+ by Daniel, which I overwrote with the previous commit.
+
Wed Mar 16 17:20:25 CET 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
* xmlschemas.c xmlschemastypes.c include/libxml/xmlschemastypes.h:
diff --git a/xmlschemastypes.c b/xmlschemastypes.c
index 230928a..b08012a 100644
--- a/xmlschemastypes.c
+++ b/xmlschemastypes.c
@@ -4410,6 +4410,8 @@
xmlSchemaValPtr y,
xmlSchemaWhitespaceValueType yws)
{
+ if ((x == NULL) || (y == NULL))
+ return(-2);
return(xmlSchemaCompareValuesInternal(x->type, x, NULL, xws, y->type,
y, NULL, yws));
}
@@ -4944,7 +4946,7 @@
* number otherwise and -1 in case of internal or API error.
*/
int
-xmlSchemaValidateFacet(xmlSchemaTypePtr base ATTRIBUTE_UNUSED,
+xmlSchemaValidateFacet(xmlSchemaTypePtr base,
xmlSchemaFacetPtr facet,
const xmlChar *value,
xmlSchemaValPtr val)
@@ -4954,14 +4956,15 @@
* xmlSchemaValidateFacet() and the new xmlSchemaValidateFacetInternal() and
* xmlSchemaValidateFacetWhtsp().
*/
- if (base != NULL)
+ if (val != NULL)
return(xmlSchemaValidateFacetInternal(facet,
- XML_SCHEMA_WHITESPACE_UNKNOWN, base->builtInType, value, val,
+ XML_SCHEMA_WHITESPACE_UNKNOWN, val->type, value, val,
XML_SCHEMA_WHITESPACE_UNKNOWN));
- else
+ else if (base != NULL)
return(xmlSchemaValidateFacetInternal(facet,
- XML_SCHEMA_WHITESPACE_UNKNOWN, XML_SCHEMAS_UNKNOWN, value, val,
+ XML_SCHEMA_WHITESPACE_UNKNOWN, base->builtInType, value, val,
XML_SCHEMA_WHITESPACE_UNKNOWN));
+ return(-1);
}
/**