diff lisp/nxml/rng-valid.el @ 111782:49c747159b30

* lisp/nxml/nxml-mode.el (nxml-parent-document): Add a variable. (nxml-parent-document-set): A function to set `nxml-parent-document'. (nxml-mode): Define using `define-derived-mode' instead of `defun'. (nxml-mode-hook): Remove `defcustom' (auto-defined by define-derived-mode'). * lisp/nxml/rng-valid.el (rng-dtd-trivial-p): Add a helper function for users who want to call `nxml-parent-document-set'.
author Sam Steingold <sds@gnu.org>
date Tue, 30 Nov 2010 12:57:48 -0500
parents 1d1d5d9bd884
children c06fec785962
line wrap: on
line diff
--- a/lisp/nxml/rng-valid.el	Tue Nov 30 12:01:18 2010 -0500
+++ b/lisp/nxml/rng-valid.el	Tue Nov 30 12:57:48 2010 -0500
@@ -518,6 +518,9 @@
 			     (goto-char pos))
 			    (t (rng-set-initial-state))))))))))
 
+(defun rng-dtd-trivial-p (dtd)
+  "Check whether the current dtd is different from the trivial default."
+  (or (null dtd) (eq dtd xmltok-predefined-entity-alist)))
 
 (defun rng-do-some-validation-1 (&optional continue-p-function)
   (let ((limit (+ rng-validate-up-to-date-end