]> git.eshelyaron.com Git - emacs.git/commitdiff
Ensure that validity messages only show when xml-validating-parser is set.
authorMark A. Hershberger <mah@everybody.org>
Thu, 2 Dec 2004 06:53:43 +0000 (06:53 +0000)
committerMark A. Hershberger <mah@everybody.org>
Thu, 2 Dec 2004 06:53:43 +0000 (06:53 +0000)
lisp/xml.el

index ec048a440bd434725ee8afd058718323e6301c2e..cf1fd771d18903c019e914fe27b34a04fc82a061 100644 (file)
@@ -653,7 +653,8 @@ This follows the rule [28] in the XML specifications."
                                                xml-validating-parser
                                                parse-ns))))))))
           (t
-           (error "XML: (Validity) Invalid DTD item")))))
+           (when xml-validating-parser
+             (error "XML: (Validity) Invalid DTD item")))))
       (if (looking-at "\\s-*]>")
          (goto-char (nth 1 (match-data)))))
     (nreverse dtd)))
@@ -724,9 +725,10 @@ This follows the rule [28] in the XML specifications."
                    (entity
                     (cdr entity))
                    ((eq (length this-part) 0)
-                    (error "XML: (Validity) No entity given"))
+                    (when xml-validating-parser
+                      (error "XML: (Validity) No entity given")))
                    (t
-                    (if xml-validating-parser
+                    (when xml-validating-parser
                         (error "XML: (Validity) Undefined entity `%s'"
                                this-part))))))