More dtd problems.
When I write a text xml file and a dtd for it, as in the JAXP tutorial,
any attempt to indent the buffer text leads to the following problem.
Signaling: (wrong-type-argument stringp nil)
string-match("^\\(+//\\|-//\\|\\)\\(\\([^/]\\|/[^/]\\)+\\)//\\([^
]+\\)
\\(\\([^/]\\|/[^/]\\)*\\)//\\(\\([^/]\\|/[^/]\\)*\\)\\(//\\(\\([^/]\\|/[^/]\\)*\\)\\)?"
nil)
sgml-canonize-pubid(nil)
sgml-setup-doctype("slideshow" (nil "./slideshow.dtd" .
"/home/pbw/src/xml/"))
sgml-do-doctype()
sgml-parse-markup-declaration(prolog)
sgml-parse-prolog()
sgml-load-doctype()
sgml-need-dtd()
sgml-parse-to(2)
sgml-find-element-of(1)
byte-code("..." [sgml-find-context-of sgml-find-element-of] 2)
sgml-indent-line()
#<compiled-function nil "...(9)" [sgml-indent-step insert-tab
indent-line-function] 1
("/usr/local/lib/xemacs/xemacs-packages/lisp/psgml/psgml.elc" . 25016)
nil>()
call-interactively(sgml-indent-or-tab)
The difficulty is that my DOCTYPE is a SYSTEM followed by the local
filename of the dtd. In the call to `sgml-setup-doctype' the pubid is
`nil'. `sgml-canonize-pubid' however, makes no provision for a `nil'
pubid.
(defun sgml-canonize-pubid (pubid)
(if (string-match sgml-formal-pubid-regexp pubid)
(concat
....
It is called by the following code in sgml-setup-doctype
(cond (external
;; James addition - set the sgml-declaration
(let ((decl
(sgml-catalog-lookup sgml-catalog-files nil 'dtddecl
(sgml-canonize-pubid (car external)))))
Hasn't the dtddecl been excluded from XML?
Peter
--
__ /__ Peter B. West pbwest(a)netscape.net
/
http://www.powerup.com.au/~pbwest
/ "Lord, to whom shall we go?"