1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2024-10-26 12:25:09 +03:00

fixing bug #166777 (and #169838), it was an heuristic in areBlanks which

* 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
Daniel
This commit is contained in:
Daniel Veillard 2005-07-06 15:17:38 +00:00
parent 6d30ff2c08
commit abac41e829
9 changed files with 87 additions and 1 deletions

View File

@ -1,3 +1,10 @@
Wed Jul 6 17:14:03 CEST 2005 Daniel Veillard <daniel@veillard.com>
* 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 <libxml2-cvs@cazic.net>
* xmlschemastypes.c: Fixed bug #309338, reported by Kupriyanov

View File

@ -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);

View File

@ -0,0 +1,6 @@
<?xml version="1.0"?>
<a>
<B>
<C/>
</B>
</a>

6
result/winblanks.xml Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0"?>
<a>
<B>
<C/>
</B>
</a>

13
result/winblanks.xml.rde Normal file
View File

@ -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

13
result/winblanks.xml.rdr Normal file
View File

@ -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

18
result/winblanks.xml.sax Normal file
View File

@ -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()

18
result/winblanks.xml.sax2 Normal file
View File

@ -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()

5
test/winblanks.xml Normal file
View File

@ -0,0 +1,5 @@
<a>
<B>
<C/>
</B>
</a>