1 See: |
|
2 |
|
3 http://git.gnome.org/browse/libxml2/commit/?id=6c91aa384f48ff6d406553a6dd47fd556c1ef2e6 |
|
4 |
|
5 From 6c91aa384f48ff6d406553a6dd47fd556c1ef2e6 Mon Sep 17 00:00:00 2001 |
|
6 From: Daniel Veillard <[email protected]> |
|
7 Date: Thu, 25 Oct 2012 07:33:59 +0000 |
|
8 Subject: Fix a regression in 2.9.0 breaking validation while streaming |
|
9 |
|
10 https://bugzilla.gnome.org/show_bug.cgi?id=684774 |
|
11 with help from Kjell Ahlstedt <[email protected]> |
|
12 --- |
|
13 diff --git a/SAX2.c b/SAX2.c |
|
14 index a24abc8..3eea39a 100644 |
|
15 --- a/SAX2.c |
|
16 +++ b/SAX2.c |
|
17 @@ -2202,7 +2202,7 @@ xmlSAX2StartElementNs(void *ctx, |
|
18 (ctxt->myDoc->intSubset->elements == NULL) && |
|
19 (ctxt->myDoc->intSubset->attributes == NULL) && |
|
20 (ctxt->myDoc->intSubset->entities == NULL)))) { |
|
21 - xmlErrValid(ctxt, XML_ERR_NO_DTD, |
|
22 + xmlErrValid(ctxt, XML_DTD_NO_DTD, |
|
23 "Validation failed: no DTD found !", NULL, NULL); |
|
24 ctxt->validate = 0; |
|
25 } |
|
26 diff --git a/parser.c b/parser.c |
|
27 index 28b0d80..19f1217 100644 |
|
28 --- a/parser.c |
|
29 +++ b/parser.c |
|
30 @@ -11633,7 +11633,7 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) { |
|
31 "PP: Parsing internal subset\n"); |
|
32 #endif |
|
33 ctxt->inSubset = 1; |
|
34 - ctxt->progressive = 1; |
|
35 + ctxt->progressive = 0; |
|
36 ctxt->checkIndex = 0; |
|
37 xmlParseDocTypeDecl(ctxt); |
|
38 if (RAW == '[') { |
|
39 @@ -12219,7 +12219,10 @@ xmldecl_done: |
|
40 } |
|
41 ctxt->instate = XML_PARSER_EOF; |
|
42 } |
|
43 - return((xmlParserErrors) ctxt->errNo); |
|
44 + if (ctxt->wellFormed == 0) |
|
45 + return((xmlParserErrors) ctxt->errNo); |
|
46 + else |
|
47 + return(0); |
|
48 } |
|
49 |
|
50 /************************************************************************ |
|
51 -- |
|
52 cgit v0.9.0.2 |
|