diff --git a/ChangeLog b/ChangeLog index 871911a0..ba4c85e7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Wed Jul 6 17:14:03 CEST 2005 Daniel Veillard + + * parser.c: fixing bug #166777 (and #169838), it was an heuristic + in areBlanks which failed. + * result/winblanks.xml* result/noent/winblanks.xml test/winblanks.xml: + added the input file to the regression tests + Wed Jul 6 13:40:22 CEST 2005 Kasimier Buchcik * xmlschemastypes.c: Fixed bug #309338, reported by Kupriyanov diff --git a/parser.c b/parser.c index 8a7540da..744fc838 100644 --- a/parser.c +++ b/parser.c @@ -2142,7 +2142,7 @@ static int areBlanks(xmlParserCtxtPtr ctxt, const xmlChar *str, int len, /* * Otherwise, heuristic :-\ */ - if (RAW != '<') return(0); + if ((RAW != '<') && (RAW != 0xD)) return(0); if ((ctxt->node->children == NULL) && (RAW == '<') && (NXT(1) == '/')) return(0); diff --git a/result/noent/winblanks.xml b/result/noent/winblanks.xml new file mode 100644 index 00000000..0044aa2c --- /dev/null +++ b/result/noent/winblanks.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/result/winblanks.xml b/result/winblanks.xml new file mode 100644 index 00000000..0044aa2c --- /dev/null +++ b/result/winblanks.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/result/winblanks.xml.rde b/result/winblanks.xml.rde new file mode 100644 index 00000000..2f6a5d39 --- /dev/null +++ b/result/winblanks.xml.rde @@ -0,0 +1,13 @@ +0 1 a 0 0 +1 14 #text 0 1 + +1 1 B 0 0 +2 14 #text 0 1 + +2 1 C 1 0 +2 14 #text 0 1 + +1 15 B 0 0 +1 14 #text 0 1 + +0 15 a 0 0 diff --git a/result/winblanks.xml.rdr b/result/winblanks.xml.rdr new file mode 100644 index 00000000..2f6a5d39 --- /dev/null +++ b/result/winblanks.xml.rdr @@ -0,0 +1,13 @@ +0 1 a 0 0 +1 14 #text 0 1 + +1 1 B 0 0 +2 14 #text 0 1 + +2 1 C 1 0 +2 14 #text 0 1 + +1 15 B 0 0 +1 14 #text 0 1 + +0 15 a 0 0 diff --git a/result/winblanks.xml.sax b/result/winblanks.xml.sax new file mode 100644 index 00000000..72e39d55 --- /dev/null +++ b/result/winblanks.xml.sax @@ -0,0 +1,18 @@ +SAX.setDocumentLocator() +SAX.startDocument() +SAX.startElement(a) +SAX.characters( + , 5) +SAX.startElement(B) +SAX.characters( + , 9) +SAX.startElement(C) +SAX.endElement(C) +SAX.characters( , 3) +SAX.characters( +, 1) +SAX.endElement(B) +SAX.characters( +, 1) +SAX.endElement(a) +SAX.endDocument() diff --git a/result/winblanks.xml.sax2 b/result/winblanks.xml.sax2 new file mode 100644 index 00000000..6e9d693f --- /dev/null +++ b/result/winblanks.xml.sax2 @@ -0,0 +1,18 @@ +SAX.setDocumentLocator() +SAX.startDocument() +SAX.startElementNs(a, NULL, NULL, 0, 0, 0) +SAX.characters( + , 5) +SAX.startElementNs(B, NULL, NULL, 0, 0, 0) +SAX.characters( + , 9) +SAX.startElementNs(C, NULL, NULL, 0, 0, 0) +SAX.endElementNs(C, NULL, NULL) +SAX.characters( , 3) +SAX.characters( +, 1) +SAX.endElementNs(B, NULL, NULL) +SAX.characters( +, 1) +SAX.endElementNs(a, NULL, NULL) +SAX.endDocument() diff --git a/test/winblanks.xml b/test/winblanks.xml new file mode 100644 index 00000000..8f937f29 --- /dev/null +++ b/test/winblanks.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file