applied patch from John Belmonte for normalizedString datatype support.
* xmlschemastypes.c: applied patch from John Belmonte for
normalizedString datatype support.
Daniel
diff --git a/ChangeLog b/ChangeLog
index 2b51231..40df23f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Thu Jan 22 08:26:20 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * xmlschemastypes.c: applied patch from John Belmonte for
+ normalizedString datatype support.
+
Thu Jan 22 10:43:22 HKT 2004 William Brack <wbrack@mmm.com.hk>
* xpath.c: fixed problem with union when last() is used
diff --git a/xmlschemastypes.c b/xmlschemastypes.c
index c3901c5..6ffba47 100644
--- a/xmlschemastypes.c
+++ b/xmlschemastypes.c
@@ -1477,8 +1477,27 @@
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;