From james at eecs.ukans.edu Sun Feb 26 16:42:28 2017 Content-Type: multipart/mixed; boundary="===============4259196555533290635==" MIME-Version: 1.0 From: Jerry James To: xemacs-beta at xemacs.org Subject: Re: PSGML's syntax table for HTML error in XEmacs 21.1 Date: 2000-11-13 15:25:58 -0600 Message-ID: In-Reply-To: Gleb Arshinov's message of "13 Nov 2000 12:50:13 -0800" --===============4259196555533290635== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Gleb Arshinov wrote: > Save this to a file xhtml_test.html. Open it. Run C-c C-p > `sgml-parse-prolog'. At this point PSGML attempted to compile > xhtml1-transitional.dtd, and barfed while parsing it (i.e. while > parsing the DTD not the XHTML test document). The backtrace for this > is in my original message. Aha! Note that you were parsing the prolog *in SGML mode*! The real problem here is that the ".html" extension, in conjunction with auto-mode-alist, puts you into html-mode, which is a descendant of sgml-mode. Try this. Save your test file to xhtml_test.xhtml. Open it. XEmacs doesn't recognize that extension, so it is in fundamental mode. Now type M-x xml-mode. Then type C-c C-p. PSGML now tells you "XML requires a system ID after a public ID". Hmmm, there are a few problems with that file. Try this one instead: ------------------------------------------------------------------------ My Title

My Title

------------------------------------------------------------------------ Now, *in xml-mode*, type C-c C-p. No problem. Type C-c C-o (to go to the first problem spot). It goes to the end and reports "Ok". > After much scratching my head, I figured out that lines of the form: > xml:lang language code (as per XML 1.0 spec) = > in xhtml1-transitional.dtd were causing the parsing error. When I > removed these lines, PSGML was able to parse and compile the DTD. The > reason parsing of this DTD fails seems to be that PSGML uses > sgml-parser-syntax to parse the DTD and it considers ':' a terminator > for the token. So adding ':' to sgml-parser-syntax got rid of the > problem for me. Sure, but that isn't the right solution in general. The colon should not be in sgml-parser-syntax, since that is not good SGML. The right solution is to avoid assuming sgml-mode when the file extension is .html. I'm not sure how to do that, unfortunately. -- = Jerry James --===============4259196555533290635==--