This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Emacs/PSGML reports error when opening xml-file


>>>>> Kenneth Johansson <ke-joh@sectra.se>:

> It didn't however work until I changed the system identifier from
> "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd";> to
> c:/tools/lib/docbook/docbook/xml/42/docbookx.dtd. Our firewall must
> have something to do with that.

Nope.  It's caused by lack of network support in psgml.  Psgml cannot
fetch a DTD, or any other file AFAIK, using HTTP or FTP.

If you wish your documents not to be tied to a particular directory
structure, on one particular computer, you have to use a catalog file.

Luckily there is such a file distributed with the DocBook XML style
sheets. 

Try putting the following code into your .emacs file:

(defun find-dookbook-using-catalog ()
  "Add the DocBook XML catalog to the list of catalogs used by psgml
Create the list of catalogs, if it doesn't already exist."
  (let ((docbook-path "c:/tools/lib/docbook/docbook/xml/42/docbook.cat"))
    (if sgml-catalog-files
	(add-to-list 'sgml-catalog-files docbook-path)
      (setq sgml-catalog-files (list docbook-path)))))

(add-hook 'sgml-mode-hook 'find-dookbook-using-catalog)

Put the URL back into the <!DOCTYPE> declaration, restar emacs and
opening the file.  Did it find the DTD this time?

NB! The above emacs lisp code has been only _slightly_ tested!


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]