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:
11
xmlschemas.c
11
xmlschemas.c
@@ -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;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user