aboutsummaryrefslogtreecommitdiffstats
path: root/xmlschemas.c
diff options
context:
space:
mode:
authorDaniel Veillard <veillard@src.gnome.org>2005-04-05 11:10:45 +0000
committerDaniel Veillard <veillard@src.gnome.org>2005-04-05 11:10:45 +0000
commitf35984584eb5ecafded024f1f5e196a8679a87b5 (patch)
tree4baeb58019cf1b9741323fb982846cd3c70368f5 /xmlschemas.c
parent0dcc50ae489c2b1ea9759713a0310bde6d0235a7 (diff)
downloadandroid_external_libxml2-f35984584eb5ecafded024f1f5e196a8679a87b5.tar.gz
android_external_libxml2-f35984584eb5ecafded024f1f5e196a8679a87b5.tar.bz2
android_external_libxml2-f35984584eb5ecafded024f1f5e196a8679a87b5.zip
patch from Matthew Burgess to improve some schemas facets validation
* xmlschemas.c: patch from Matthew Burgess to improve some schemas facets validation messages. Daniel
Diffstat (limited to 'xmlschemas.c')
-rw-r--r--xmlschemas.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/xmlschemas.c b/xmlschemas.c
index 34bd48d8..42f84718 100644
--- a/xmlschemas.c
+++ b/xmlschemas.c
@@ -1684,18 +1684,26 @@ xmlSchemaVFacetErr(xmlSchemaValidCtxtPtr ctxt,
"maximum value allowed ('%s').\n");
xmlSchemaVErr(ctxt, node, error, (const char *) msg, value,
facet->value);
-#if 0
} else if (facetType == XML_SCHEMA_FACET_MINEXCLUSIVE) {
- msg = xmlStrcat(msg, BAD_CAST "The value '%s' is less than the "
- "minimum exclusive value allowed ('%s').\n");
+ msg = xmlStrcat(msg, BAD_CAST "The value '%s' must be less than "
+ "'%s'.\n");
xmlSchemaVErr(ctxt, node, error, (const char *) msg, value,
facet->value);
} else if (facetType == XML_SCHEMA_FACET_MAXEXCLUSIVE) {
- msg = xmlStrcat(msg, BAD_CAST "The value '%s' is greater than the "
- "maximum exclusive value allowed ('%s').\n");
+ msg = xmlStrcat(msg, BAD_CAST "The value '%s' must be more than "
+ "'%s'.\n");
xmlSchemaVErr(ctxt, node, error, (const char *) msg, value,
facet->value);
-#endif
+ } else if (facetType == XML_SCHEMA_FACET_TOTALDIGITS) {
+ msg = xmlStrcat(msg, BAD_CAST "The value '%s' has more "
+ "digits than are allowed ('%s').\n");
+ xmlSchemaVErr(ctxt, node, error, (const char*) msg, value,
+ facet->value);
+ } else if (facetType == XML_SCHEMA_FACET_FRACTIONDIGITS) {
+ msg = xmlStrcat(msg, BAD_CAST "The value '%s' has more fractional "
+ "digits than are allowed ('%s').\n");
+ xmlSchemaVErr(ctxt, node, error, (const char*) msg, value,
+ facet->value);
} else if (node->type == XML_ATTRIBUTE_NODE) {
msg = xmlStrcat(msg, BAD_CAST "The value '%s' is not facet-valid.\n");
xmlSchemaVErr(ctxt, node, error, (const char *) msg, value, NULL);