Adrian Aichner <aichner(a)ecf.teradyne.com> wrote:
While implementing HTML document validation for our next-generation
XEmacs website I have some questions about PSGML:
1. How can I access the DTD doctype of buffer after validating it
(i.e. it has been parsed and all information should be available
via sgml-dtd-info)?
If you just want the generic type (like "HTML"), then (sgml-dtd-doctype
sgml-dtd-info) should do the trick. If you want the name of the file
containing the DTD, use (sgml-declaration). If you want the public
identifier of the DTD, then I'm afraid that you are out of luck. As
far as I can see, that information is discarded after the public
identifier is mapped to a file. The file name is probably better
anyway, since multiple forms of an identifier can be mapped to the same
file.
2. How can I access the error message reported by
(sgml-next-trouble-spot)?
Those messages are generated with (message ...), so (current-message)
should get the most recent one. I think. But what you wrote next makes
me think I misinterpreted your question. Did I misunderstand you?
I tried using
(if sgml-last-element
(setq context (sgml-element-context-string sgml-last-element)))
but sgml-last-element is nil even though an error occured. To be
honest, it worked in a debugging session of XEmacs, but not in a
freshly started one.
Regards,
--
Jerry James
Email: james(a)eecs.ukans.edu
WWW:
http://www.eecs.ukans.edu/~james/