1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-07-30 22:43:14 +03:00

applied patch from John Belmonte for normalizedString datatype support.

* xmlschemastypes.c: applied patch from John Belmonte for
  normalizedString datatype support.
Daniel
This commit is contained in:
Daniel Veillard
2004-01-22 07:27:45 +00:00
parent ce4fc56e1b
commit 1516d5b347
2 changed files with 26 additions and 2 deletions

View File

@ -1477,8 +1477,27 @@ xmlSchemaValAtomicType(xmlSchemaTypePtr type, const xmlChar * value,
goto error;
case XML_SCHEMAS_STRING:
goto return0;
case XML_SCHEMAS_NORMSTRING:
TODO goto return0;
case XML_SCHEMAS_NORMSTRING:{
const xmlChar *cur = value;
while (*cur != 0) {
if ((*cur == 0xd) || (*cur == 0xa) || (*cur == 0x9)) {
goto return1;
} else {
cur++;
}
}
if (val != NULL) {
v = xmlSchemaNewValue(XML_SCHEMAS_NORMSTRING);
if (v != NULL) {
v->value.str = xmlStrdup(value);
*val = v;
} else {
goto error;
}
}
goto return0;
}
case XML_SCHEMAS_DECIMAL:{
const xmlChar *cur = value, *tmp;
unsigned int frac = 0, len, neg = 0;