From gleb at broadbase.com Sun Feb 26 16:42:27 2017 Content-Type: multipart/mixed; boundary="===============5958717488368508752==" MIME-Version: 1.0 From: Gleb Arshinov To: xemacs-beta at xemacs.org Subject: Re: PSGML's syntax table for HTML error in XEmacs 21.1 Date: 2000-11-13 12:50:13 -0800 Message-ID: In-Reply-To: james@eecs.ukans.edu's message of "13 Nov 2000 10:07:46 -0600" --===============5958717488368508752== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable >>>>> "Jerry" =3D=3D Jerry James writes: Gleb> It seems like I hit the problem previously reported in Gleb> http://www.xemacs.org/list-archives/xemacs-beta/200009/msg00153.h= tml Jerry> The problem there was that Stephen had an old version of Jerry> PSGML installed. You appear to have the latest version, Jerry> however. Also note that Stephen's problem was with XML, Jerry> but your patch modifies sgml-parser-syntax. If you look at Jerry> the code in psgml-parse.el just after your patch, you will Jerry> see that the colon *is* in xml-parser-syntax. So this does Jerry> not seem to be the problem previously reported. Hi Jerry, The way I read it, Stephen's problem is exact same one I am reporting. Let me try to provide more detail. Jerry> What, exactly, were you trying to do, and what did PSGML do Jerry> that you consider incorrect? Basically, I wanted to migrate my HTML documents from "-//W3C//DTD HTML 4.0 Transitional//EN" to "-//W3C//DTD XHTML 1.0 Transitional//EN". Both are types of HTML. The latter also happens to be XML (XHTML is supposed to be an intersection of HTML spec and XML spec). I had old PSGML packages which did not include XHTML DTDs, so I upgraded all the packages to the latest versions. Then I tried to validate a small XHTML document: Jerry> Can you give some example SGML that shows the problem? My Title

My Title

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. 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. Jerry> Finally, if this really is a problem with PSGML, it should Jerry> also be reported to Lennart Staflin, the PSGML maintainer. The way I read Stephen's message, it worked for him in 21.2. If this works in 21.2 but not in 21.1, I figure XEmacs team should have the first try. Gleb --===============5958717488368508752==--