Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id E4BC5B5DC1E for ; Tue, 30 Aug 2011 14:36:29 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 32836-04-7 for ; Tue, 30 Aug 2011 17:36:23 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mailout-de.gmx.net (mailout-de.gmx.net [213.165.64.22]) by mail.postgresql.org (Postfix) with SMTP id 142A5B5DDCC for ; Tue, 30 Aug 2011 14:36:22 -0300 (ADT) Received: (qmail invoked by alias); 30 Aug 2011 17:36:21 -0000 Received: from a88-115-218-165.elisa-laajakaista.fi (EHLO [10.0.0.102]) [88.115.218.165] by mail.gmx.net (mp008) with SMTP; 30 Aug 2011 19:36:21 +0200 X-Authenticated: #495269 X-Provags-ID: V01U2FsdGVkX1/NXU14OOjNXfTOVknG1yn0BG1u7bl8upHfXxIOut 2ltgIrv7NkskW/ Subject: Re: sgml cleanup: unescaped '>' characters From: Peter Eisentraut To: Josh Kupershmidt Cc: pgsql-docs In-Reply-To: References: <1314478125.2349.39.camel@vanquo.pezone.net> Content-Type: text/plain; charset="UTF-8" Date: Tue, 30 Aug 2011 20:36:19 +0300 Message-ID: <1314725779.11209.1.camel@vanquo.pezone.net> Mime-Version: 1.0 X-Mailer: Evolution 2.32.3 Content-Transfer-Encoding: 8bit X-Y-GMX-Trusted: 0 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.403 tagged_above=-5 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RP_MATCHES_RCVD=-0.504 X-Spam-Level: X-Archive-Number: 201108/28 X-Sequence-Number: 6918 On mån, 2011-08-29 at 18:22 -0500, Josh Kupershmidt wrote: > >> The rewritten version picked up a few stylistic inconsistencies in the > >> SGML, such as: > >> * breaking the trailing '>' of an SGML marker across lines. AFAIK > >> this is legal, but is a bit inconsistent and just confuses simplistic > >> tools like find_gt_lt > > > > The cases you show don't appear to be terribly useful, but I think on > > occasion this can be necessary to work around some arcane whitespace > > rules in SGML or XML. (Just look at the generated HTML; it uses this > > technique throughout.) > > Hrm, well if the spurious whitespace isn't serving any purpose in > these cases, why not just fix it to match the rest of SGML style? > > >> * using single quotes instead of double quotes to surround a node > >> attribute, as in > > > > It would be better if the tool could handle that, because sometimes you > > want to use single quotes if the value contains double quotes. > > It's trivial to adjust the regex I was using to ignore such cases. I'm > just on about stylistic consistency here. If there's a reason to use > single quotes, such as when the value contains double quotes, then > that's fine -- but I don't think any of the cases I pointed out fall > under that category. I have committed your fixes relevant to these two points. > >> as well as seemingly-invalid SGML, such as using '>' unescaped inside > >> normal SGML entries. > > > > Unescaped > is valid, AFAIK. > > Oh, that's interesting. I took a quick look at "The SGML FAQ book", > page 73 [1], which supports this claim. > > But I notice we've been fixing such issues in the recent past (e.g. > commit d420ba2a2d4ea4831f89a3fd7ce86b05eff932ff). Don't we want to > continue doing so? Not to mention the fact that we have > ./src/tools/find_gt_lt, which while somewhat broken, has the > ostensible goal of finding such problems in the SGML. Or do we want to > stop worrying about '>' entirely, and rename find_gt_lt to find_lt, > instead? > [1] http://books.google.com/books?id=OyJHFJsnh10C&lpg=PA229&ots=DGkYDdvbhE&pg=PA73#v=onepage&q&f=false I don't know what the rationale for this tool is. I have never used it. Clearly, the reference shows, and the tools we use confirm, that it is not necessary to use it.