Solution: setting sgml-validate-command to something useful for XML

Christian Lemburg <[email protected]> 17 Jun 2002 17:09:41 +0200
Newsgroups gmane.emacs.xae
Message-ID <[email protected]>
I observe that XAE does nothing to add to xml-mode's (lack of useful)
behavior regarding validation by an external tool, so I offer my
little workaround, in case it may be useful for others:

;; this sets the validation command for XML files to something useful
(defun my-xml-validate-command (catalog-files)
  "Set sgml-validate-command to something useful for XML, using given catalog file(s)."
  (interactive "fCatalog file(s): ")
  (setq sgml-validate-command 
	(concat "SGML_CATALOG_FILES=" catalog-files " xmllint --valid --noout --catalogs %s %s")))

Note that you may need to change the last line to use your favorite
validating parser.

-- 
Christian Lemburg, <[email protected]>, http://www.clemburg.com/
 Hail to the sun god
 He sure is a fun god
 Ra!  Ra!  Ra!

_______________________________________________
XAE mailing list
[email protected]
http://sunsite.dk/mailman/listinfo/xae