Sophie

Sophie

distrib > Mageia > 5 > i586 > by-pkgid > 21fd0020558df530571c7530ef7c8377 > files > 3

libxml2-2.9.1-11.3.mga5.src.rpm

Index: libxml2-2.9.1/xmllint.c
===================================================================
--- libxml2-2.9.1.orig/xmllint.c	2013-03-27 04:31:47.000000000 +0100
+++ libxml2-2.9.1/xmllint.c	2014-05-23 11:26:43.344897186 +0200
@@ -3505,7 +3505,12 @@ main(int argc, char **argv) {
 	xmlLoadExtDtdDefaultValue |= XML_COMPLETE_ATTRS;
     if (noent != 0) xmlSubstituteEntitiesDefault(1);
 #ifdef LIBXML_VALID_ENABLED
-    if (valid != 0) xmlDoValidityCheckingDefaultValue = 1;
+    /* If we will validate only a posteriori, ensure that entities get loaded,
+     * but suppress validation messages during initial parsing */
+    if (postvalid != 0 && valid == 0)
+	options |= XML_PARSE_DTDVALID | XML_PARSE_NOERROR | XML_PARSE_NOWARNING;
+    else if (valid != 0)
+	xmlDoValidityCheckingDefaultValue = 1;
 #endif /* LIBXML_VALID_ENABLED */
     if ((htmlout) && (!nowrap)) {
 	xmlGenericError(xmlGenericErrorContext,