[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: XEmacs and the web.xml DTD
- From: olivier.dameron@gmx.net
- To: william.crandall@concept.com
- Date: Mon, 23 Apr 2001 16:26:47 +0200 (MEST)
> I'm using XEmacs to edit a web.xml deployment descriptor,
> loading (by hand) xml-mode (which becomes sgml-mode).
in your .emacs, insert :
;; SGML - XML
;; ================
(setq load-path (cons (expand-file-name
"/export/softs/xemacs/lib/xemacs-20.4/lisp/psgml") load-path))
(autoload 'sgml-mode "psgml" "Major mode to edit SGML files." t)
(autoload 'xml-mode "psgml" "Major mode to edit XML files." t)
(setq auto-mode-alist
(cons '("\\.sgml$" . sgml-mode) auto-mode-alist))
(setq auto-mode-alist
(cons '("\\.xml$" . xml-mode) auto-mode-alist))
This should automatically load psgml mode when opening .xml and .sgml files
> My problem: Parsing the doctype:
>
> <!DOCTYPE web-app
> PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
> "http://java.sun.com/j2ee/dtds/web-app_2.2.dtd">
>
> generates this error:
>
> External entity WEB-APP not found
> Public identifier -//Sun Microsystems, Inc.//DTD Web Application 2.2//EN
> System identifier http://java.sun.com/j2ee/dtds/web-app_2.2.dtd
>
>
> 1. Should I use a different major mode?
NO. psgml is OK
>
> 2. Should I put this dtd on my local system (if so, from where,
> and to where)?
psgml allows you to use catalog files (files for mapping a public identifier
(-//Sun Microsystems, Inc.//DTD Web...) with a file on your system.
Once psgml mode is loaded in emacs, look at the sgml-catalog_file variable.
It should specify at least a catalog file. Then, check if this catalog
exists in your system.
If so, just copy the dtd wherever you want, and update the catalog file
If not contact me, I will send you an example
Restart emacs
Hope this helps.
Olivier Dameron
-----------------------------------------
http://sim3.univ-rennes1.fr/users/dameron
--
Sent through GMX FreeMail - http://www.gmx.net