1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-10-21 14:53:44 +03:00

Changed xmlSchemaFormatIDCKeySequence() to use

* xmlschemas.c: Changed xmlSchemaFormatIDCKeySequence()
  to use xmlSchemaGetCanonValueWhtspExt() in order to
  correctly report values for xs:anySimpleType.
* test/schemas/idc-keyref-err1*
  result/schemas/idc-keyref-err1*: Added a test for this change.
This commit is contained in:
Kasimier T. Buchcik
2005-11-11 12:52:32 +00:00
parent a44f234d3a
commit 77e76829b6
6 changed files with 83 additions and 5 deletions

View File

@@ -22156,15 +22156,16 @@ xmlSchemaFormatIDCKeySequence(xmlSchemaValidCtxtPtr vctxt,
int count)
{
int i, res;
const xmlChar *value = NULL;
xmlChar *value = NULL;
*buf = xmlStrdup(BAD_CAST "[");
for (i = 0; i < count; i++) {
*buf = xmlStrcat(*buf, BAD_CAST "'");
res = xmlSchemaGetCanonValueWhtsp(seq[i]->val, &value,
xmlSchemaGetWhiteSpaceFacetValue(seq[i]->type));
res = xmlSchemaGetCanonValueWhtspExt(seq[i]->val,
xmlSchemaGetWhiteSpaceFacetValue(seq[i]->type),
&value);
if (res == 0)
*buf = xmlStrcat(*buf, value);
*buf = xmlStrcat(*buf, BAD_CAST value);
else {
VERROR_INT("xmlSchemaFormatIDCKeySequence",
"failed to compute a canonical value");
@@ -22175,7 +22176,7 @@ xmlSchemaFormatIDCKeySequence(xmlSchemaValidCtxtPtr vctxt,
else
*buf = xmlStrcat(*buf, BAD_CAST "'");
if (value != NULL) {
xmlFree((xmlChar *) value);
xmlFree(value);
value = NULL;
}
}