From f34a20e69dc675cd23d3eb558cad135ea280f472 Mon Sep 17 00:00:00 2001 From: Daniel Veillard Date: Tue, 31 Aug 2004 08:42:17 +0000 Subject: [PATCH] "" is a valid hexbinary string dixit xmlschema-dev update the test. added * xmlschemastypes.c: "" is a valid hexbinary string dixit xmlschema-dev * result/schemas/hexbinary_0_1.err test/schemas/hexbinary_1.xml: update the test. * test/ns5 result//ns5*: added a test for the namespace bug fixed in previous commit. * Makefile.am: added a message in the regression tests Daniel --- ChangeLog | 9 +++++++++ Makefile.am | 1 + result/noent/ns5 | 4 ++++ result/ns5 | 4 ++++ result/ns5.rde | 7 +++++++ result/ns5.rdr | 7 +++++++ result/ns5.sax | 11 +++++++++++ result/schemas/hexbinary_0_1.err | 2 -- test/ns5 | 4 ++++ test/schemas/hexbinary_1.xml | 2 +- xmlschemastypes.c | 2 +- 11 files changed, 49 insertions(+), 4 deletions(-) create mode 100644 result/noent/ns5 create mode 100644 result/ns5 create mode 100644 result/ns5.rde create mode 100644 result/ns5.rdr create mode 100644 result/ns5.sax create mode 100644 test/ns5 diff --git a/ChangeLog b/ChangeLog index 30a76826..853447b0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +Tue Aug 31 10:37:23 CEST 2004 Daniel Veillard + + * xmlschemastypes.c: "" is a valid hexbinary string dixit xmlschema-dev + * result/schemas/hexbinary_0_1.err test/schemas/hexbinary_1.xml: + update the test. + * test/ns5 result//ns5*: added a test for the namespace bug fixed + in previous commit. + * Makefile.am: added a message in the regression tests + Mon Aug 30 23:36:21 PDT 2004 William Brack * SAX2.c: fixed bug introduced during OOM fixup causing problems diff --git a/Makefile.am b/Makefile.am index ff2ff61c..29723661 100644 --- a/Makefile.am +++ b/Makefile.am @@ -967,6 +967,7 @@ SchemasPythonTests: PYTHONPATH=$(top_builddir)/python:$(top_builddir)/python/.libs:$$PYTHONPATH; \ export PYTHONPATH; \ echo "## XML Schemas datatypes Python based test suite" ; \ + echo "## It is normal to see 6 errors reported" ; \ $(CHECKER) $(PYTHON) $(srcdir)/check-xsddata-test-suite.py ; \ fi) diff --git a/result/noent/ns5 b/result/noent/ns5 new file mode 100644 index 00000000..0afe4e2c --- /dev/null +++ b/result/noent/ns5 @@ -0,0 +1,4 @@ + + + + diff --git a/result/ns5 b/result/ns5 new file mode 100644 index 00000000..0afe4e2c --- /dev/null +++ b/result/ns5 @@ -0,0 +1,4 @@ + + + + diff --git a/result/ns5.rde b/result/ns5.rde new file mode 100644 index 00000000..30ce1969 --- /dev/null +++ b/result/ns5.rde @@ -0,0 +1,7 @@ +0 1 element 0 0 +1 14 #text 0 1 + +1 1 empty 1 0 +1 14 #text 0 1 + +0 15 element 0 0 diff --git a/result/ns5.rdr b/result/ns5.rdr new file mode 100644 index 00000000..30ce1969 --- /dev/null +++ b/result/ns5.rdr @@ -0,0 +1,7 @@ +0 1 element 0 0 +1 14 #text 0 1 + +1 1 empty 1 0 +1 14 #text 0 1 + +0 15 element 0 0 diff --git a/result/ns5.sax b/result/ns5.sax new file mode 100644 index 00000000..e458bcac --- /dev/null +++ b/result/ns5.sax @@ -0,0 +1,11 @@ +SAX.setDocumentLocator() +SAX.startDocument() +SAX.startElement(element, name='foo', xmlns:rng='http://example.org/ns/1', xmlns='http://example.org/ns/1') +SAX.characters( + , 3) +SAX.startElement(empty) +SAX.endElement(empty) +SAX.characters( +, 1) +SAX.endElement(element) +SAX.endDocument() diff --git a/result/schemas/hexbinary_0_1.err b/result/schemas/hexbinary_0_1.err index 416e5758..e483c914 100644 --- a/result/schemas/hexbinary_0_1.err +++ b/result/schemas/hexbinary_0_1.err @@ -1,5 +1,3 @@ -./test/schemas/hexbinary_1.xml:4: element hex: Schemas validity error : Element 'hex' ['hexBinary']: The character content is not valid. -./test/schemas/hexbinary_1.xml:5: element hex: Schemas validity error : Element 'hex' ['hexBinary']: The character content is not valid. ./test/schemas/hexbinary_1.xml:6: element hex: Schemas validity error : Element 'hex' ['hexBinary']: The character content is not valid. ./test/schemas/hexbinary_1.xml:7: element hex: Schemas validity error : Element 'hex' ['hexBinary']: The character content is not valid. ./test/schemas/hexbinary_1.xml:8: element hex: Schemas validity error : Element 'hex' ['hexBinary']: The character content is not valid. diff --git a/test/ns5 b/test/ns5 new file mode 100644 index 00000000..d75d345a --- /dev/null +++ b/test/ns5 @@ -0,0 +1,4 @@ + + + + diff --git a/test/schemas/hexbinary_1.xml b/test/schemas/hexbinary_1.xml index b9d69234..0f348548 100644 --- a/test/schemas/hexbinary_1.xml +++ b/test/schemas/hexbinary_1.xml @@ -1,5 +1,5 @@ - + diff --git a/xmlschemastypes.c b/xmlschemastypes.c index e8670546..9ebcfd9b 100644 --- a/xmlschemastypes.c +++ b/xmlschemastypes.c @@ -2304,7 +2304,7 @@ xmlSchemaValAtomicType(xmlSchemaTypePtr type, const xmlChar * value, xmlChar *base; int total, i = 0; - if ((cur == NULL) || (*cur == 0)) + if (cur == NULL) goto return1; while (((*cur >= '0') && (*cur <= '9')) ||