fixed the push mode when a big comment occurs before an internal subset,

* parser.c: fixed the push mode when a big comment occurs before
  an internal subset, should close bug #438835
* test/comment6.xml result//comment6.xml*: added a special
  test in the regression suite
Daniel

svn path=/trunk/; revision=3635
This commit is contained in:
Daniel Veillard 2007-06-12 14:44:32 +00:00
parent b9e5acc490
commit dfac946c3d
9 changed files with 105 additions and 0 deletions

View File

@ -1,3 +1,10 @@
Tue Jun 12 16:42:14 CEST 2007 Daniel Veillard <daniel@veillard.com>
* parser.c: fixed the push mode when a big comment occurs before
an internal subset, should close bug #438835
* test/comment6.xml result//comment6.xml*: added a special
test in the regression suite
Tue Jun 12 15:41:09 CEST 2007 Daniel Veillard <daniel@veillard.com>
* parser.c: fix bug #414846 where invalid characters in attributes

View File

@ -10153,6 +10153,7 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) {
#endif
xmlParseComment(ctxt);
ctxt->instate = XML_PARSER_MISC;
ctxt->checkIndex = 0;
} else if ((cur == '<') && (next == '!') &&
(ctxt->input->cur[2] == 'D') &&
(ctxt->input->cur[3] == 'O') &&

14
result/comment6.xml Normal file
View File

@ -0,0 +1,14 @@
<?xml version="1.0"?>
<!--
long comment long comment long comment long comment long comment long comment
long comment long comment long comment long comment long comment long comment
long comment long comment long comment long comment long comment long comment
long comment long comment long comment long comment long comment long comment
long comment long comment long comment long comment long comment long comment
long comment long comment long comment long comment long comment long comment
long comment long comment long comment long comment long comment long comment
-->
<!DOCTYPE a [
<!ELEMENT a EMPTY>
]>
<a/>

11
result/comment6.xml.rde Normal file
View File

@ -0,0 +1,11 @@
0 8 #comment 0 1
long comment long comment long comment long comment long comment long comment
long comment long comment long comment long comment long comment long comment
long comment long comment long comment long comment long comment long comment
long comment long comment long comment long comment long comment long comment
long comment long comment long comment long comment long comment long comment
long comment long comment long comment long comment long comment long comment
long comment long comment long comment long comment long comment long comment
0 10 a 0 0
0 1 a 1 0

11
result/comment6.xml.rdr Normal file
View File

@ -0,0 +1,11 @@
0 8 #comment 0 1
long comment long comment long comment long comment long comment long comment
long comment long comment long comment long comment long comment long comment
long comment long comment long comment long comment long comment long comment
long comment long comment long comment long comment long comment long comment
long comment long comment long comment long comment long comment long comment
long comment long comment long comment long comment long comment long comment
long comment long comment long comment long comment long comment long comment
0 10 a 0 0
0 1 a 1 0

17
result/comment6.xml.sax Normal file
View File

@ -0,0 +1,17 @@
SAX.setDocumentLocator()
SAX.startDocument()
SAX.comment(
long comment long comment long comment long comment long comment long comment
long comment long comment long comment long comment long comment long comment
long comment long comment long comment long comment long comment long comment
long comment long comment long comment long comment long comment long comment
long comment long comment long comment long comment long comment long comment
long comment long comment long comment long comment long comment long comment
long comment long comment long comment long comment long comment long comment
)
SAX.internalSubset(a, , )
SAX.elementDecl(a, 1, ...)
SAX.externalSubset(a, , )
SAX.startElement(a)
SAX.endElement(a)
SAX.endDocument()

17
result/comment6.xml.sax2 Normal file
View File

@ -0,0 +1,17 @@
SAX.setDocumentLocator()
SAX.startDocument()
SAX.comment(
long comment long comment long comment long comment long comment long comment
long comment long comment long comment long comment long comment long comment
long comment long comment long comment long comment long comment long comment
long comment long comment long comment long comment long comment long comment
long comment long comment long comment long comment long comment long comment
long comment long comment long comment long comment long comment long comment
long comment long comment long comment long comment long comment long comment
)
SAX.internalSubset(a, , )
SAX.elementDecl(a, 1, ...)
SAX.externalSubset(a, , )
SAX.startElementNs(a, NULL, NULL, 0, 0, 0)
SAX.endElementNs(a, NULL, NULL)
SAX.endDocument()

14
result/noent/comment6.xml Normal file
View File

@ -0,0 +1,14 @@
<?xml version="1.0"?>
<!--
long comment long comment long comment long comment long comment long comment
long comment long comment long comment long comment long comment long comment
long comment long comment long comment long comment long comment long comment
long comment long comment long comment long comment long comment long comment
long comment long comment long comment long comment long comment long comment
long comment long comment long comment long comment long comment long comment
long comment long comment long comment long comment long comment long comment
-->
<!DOCTYPE a [
<!ELEMENT a EMPTY>
]>
<a/>

13
test/comment6.xml Normal file
View File

@ -0,0 +1,13 @@
<!--
long comment long comment long comment long comment long comment long comment
long comment long comment long comment long comment long comment long comment
long comment long comment long comment long comment long comment long comment
long comment long comment long comment long comment long comment long comment
long comment long comment long comment long comment long comment long comment
long comment long comment long comment long comment long comment long comment
long comment long comment long comment long comment long comment long comment
-->
<!DOCTYPE a [
<!ELEMENT a EMPTY>
]>
<a/>