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]

Emacs/PSGML reports error when opening xml-file


Hi,

When opening a xml-file with the header below I get an error in *SGML LOG* from Emacs or PSGML. Error is shown below header. 

<?xml version="1.0"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd";>



External entity book not found
  Public identifier -//OASIS//DTD DocBook XML V4.2//EN
  System identifier http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd

Does this have something to do with my PSGML-settings or is it a firewall issue?

best regards,

/Kenneth

PS. My settings in _emacs is:

;; append some additional paths to load-path
(setq load-path
       (nconc load-path (list "C:/Programs/Emacs/site-lisp"
         "C:/Programs/Emacs/site-lisp/psgml-1.2.5")))

(global-set-key [home] 'beginning-of-line)
(global-set-key [end] 'end-of-line)

(autoload 'lyskom "lyskom" "Start LysKOM" t)

;; set the catalog containing references to precompiled dtd
(setq sgml-ecat-files
       (list "c:/tools/lib/docbook/docbook/xml/42/ecatalog")
       )
(setq sgml-recompile-out-of-date-cdtd "ask")

;; PSGML menus for creating new documents
(setq sgml-custom-dtd
'(
  ( "DocBook XML 4.2"
   "<!DOCTYPE book PUBLIC \"-//OASIS//DTD DocBook XML V4.2//EN\" \"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd\";>")
  )
)

;; Turn on syntax coloring
(cond ((fboundp 'global-font-lock-mode)
;; Turn on font-lock in all modes that support it
(global-font-lock-mode t)
;; maximum colors
(setq font-lock-maximum-decoration t)))
;; load sgml-mode
;;(autoload 'sgml-mode "psgml" "Major mode to edit SGML files." t )
;; in sgml documents, parse dtd immediately to allow immediate
;; syntax coloring
(setq sgml-auto-activate-dtd t)
;; set the default SGML declaration. docbook.dcl should work for most DTDs
;; (setq sgml-declaration "C:\tools\lib\docbook\docbook-xml-42\docbookx.dcl")
;; here we set the syntax color information for psgml
(setq-default sgml-set-face t)

(setq  sgml-default-dtd-file "c:/tools/lib/docbook/docbook/xml/42/docbookx.dtd")

;;
;; Faces.
;;
(make-face 'sgml-comment-face)
(make-face 'sgml-doctype-face)
(make-face 'sgml-end-tag-face)
(make-face 'sgml-entity-face)
(make-face 'sgml-ignored-face)
(make-face 'sgml-ms-end-face)
(make-face 'sgml-ms-start-face)
(make-face 'sgml-pi-face)
(make-face 'sgml-sgml-face)
(make-face 'sgml-short-ref-face)
(make-face 'sgml-start-tag-face)
(set-face-foreground 'sgml-comment-face "dark turquoise")
(set-face-foreground 'sgml-doctype-face "red")
(set-face-foreground 'sgml-end-tag-face "blue")
(set-face-foreground 'sgml-entity-face "magenta")
(set-face-foreground 'sgml-ignored-face "gray40")
(set-face-background 'sgml-ignored-face "gray60")
(set-face-foreground 'sgml-ms-end-face "green")
(set-face-foreground 'sgml-ms-start-face "yellow")
(set-face-foreground 'sgml-pi-face "lime green")
(set-face-foreground 'sgml-sgml-face "brown")
(set-face-foreground 'sgml-short-ref-face "deep sky blue")
(set-face-foreground 'sgml-start-tag-face "dark green")
(setq-default sgml-markup-faces

'((comment . sgml-comment-face)
(doctype . sgml-doctype-face)
(end-tag . sgml-end-tag-face)
(entity . sgml-entity-face)
(ignored . sgml-ignored-face)
(ms-end . sgml-ms-end-face)
(ms-start . sgml-ms-start-face)
(pi . sgml-pi-face)
(sgml . sgml-sgml-face)
(short-ref . sgml-short-ref-face)
(start-tag . sgml-start-tag-face)))
;; load xml-mode
(setq auto-mode-alist
(append (list (cons "\\.xml\\'" 'xml-mode))
auto-mode-alist))
(autoload 'xml-mode "psgml" t)
;(setq sgml-xml-declaration "C:/tools/lib/docbook/docbook/xml/42/docbookx.dcl")

;; define html mode
(or (assoc "\\.html$" auto-mode-alist)
(setq auto-mode-alist (cons '("\\.html$" . sgml-html-mode)
auto-mode-alist)))
(or (assoc "\\.htm$" auto-mode-alist)
(setq auto-mode-alist (cons '("\\.htm$" . sgml-html-mode)
auto-mode-alist)))
(defun sgml-html-mode ()
"This version of html mode is just a wrapper around sgml mode."
(interactive)
(sgml-mode)
(make-local-variable 'sgml-declaration)
(make-local-variable 'sgml-default-doctype-name)
(setq
sgml-default-doctype-name "html"
;sgml-declaration "c:/cygwin/usr/local/lib/sgml/dtd/html/html.dcl"
sgml-always-quote-attributes t
sgml-indent-step 2
sgml-indent-data t
sgml-minimize-attributes nil
sgml-omittag t
sgml-shorttag t
)
)
(setq-default sgml-indent-data t)
(setq
sgml-always-quote-attributes t
sgml-auto-insert-required-elements t
sgml-auto-activate-dtd t
sgml-indent-data t
sgml-indent-step 2
sgml-minimize-attributes nil
sgml-omittag nil
sgml-shorttag nil
)

DS.
--------------------------------------------------------
Kenneth Johansson	Technical Documentation Manager
Sectra Imtec AB
Teknikringen 2		E-mail: ke-joh AT sectra DOT se
SE-583 30 Linköping	Phone:	+46 13 23 52 00
SWEDEN			Web:	http://www.sectra.se


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