pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
sgml cleanup: unescaped '>' characters
13+ messages / 3 participants
[nested] [flat]

* sgml cleanup: unescaped '>' characters
@ 2011-08-25 03:28 Josh Kupershmidt <schmiddy@gmail.com>
  2011-08-27 20:48 ` Re: sgml cleanup: unescaped '>' characters Peter Eisentraut <peter_e@gmx.net>
  0 siblings, 1 reply; 13+ messages in thread

From: Josh Kupershmidt @ 2011-08-25 03:28 UTC (permalink / raw)
  To: pgsql-docs

I found myself rewriting the ./src/tools/find_gt_lt script in Perl
this evening, since the existing script was quite broken (the main
problem is it's not capable of understanding CDATA or sgml comment
sections, and hence produces a bunch of noise).

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
 * using single quotes instead of double quotes to surround a node
attribute, as in <orderedlist numeration='loweralpha'>

as well as seemingly-invalid SGML, such as using '>' unescaped inside
normal SGML entries.

I've attached a patch to fix these problems. I can send in the new
version of find_gt_lt if these changes prove useful.

Josh

Attachments:

sgml_unescaped_gt.patch (text/x-patch, 16.8K) download diff --git a/doc/src/sgml/datatype.sgml b/doc/src/sgml/datatype.sgml index 89b531f..f026c7b 100644 *** a/doc/src/sgml/datatype.sgml --- b/doc/src/sgml/datatype.sgml *************** SELECT * FROM person WHERE current_mood *** 2951,2964 **** <programlisting> INSERT INTO person VALUES ('Larry', 'sad'); INSERT INTO person VALUES ('Curly', 'ok'); ! SELECT * FROM person WHERE current_mood > 'sad'; name | current_mood -------+-------------- Moe | happy Curly | ok (2 rows) ! SELECT * FROM person WHERE current_mood > 'sad' ORDER BY current_mood; name | current_mood -------+-------------- Curly | ok --- 2951,2964 ---- <programlisting> INSERT INTO person VALUES ('Larry', 'sad'); INSERT INTO person VALUES ('Curly', 'ok'); ! SELECT * FROM person WHERE current_mood &gt; 'sad'; name | current_mood -------+-------------- Moe | happy Curly | ok (2 rows) ! SELECT * FROM person WHERE current_mood &gt; 'sad' ORDER BY current_mood; name | current_mood -------+-------------- Curly | ok diff --git a/doc/src/sgml/ecpg.sgml b/doc/src/sgml/ecpg.sgml index 8470122..895403a 100644 *** a/doc/src/sgml/ecpg.sgml --- b/doc/src/sgml/ecpg.sgml *************** CREATE TABLE t3 ( *** 1416,1422 **** ii integer[] ); ! testdb=> SELECT * FROM t3; ii ------------- {1,2,3,4,5} --- 1416,1422 ---- ii integer[] ); ! testdb=&gt; SELECT * FROM t3; ii ------------- {1,2,3,4,5} diff --git a/doc/src/sgml/hstore.sgml b/doc/src/sgml/hstore.sgml index aa21295..0f1b6b4 100644 *** a/doc/src/sgml/hstore.sgml --- b/doc/src/sgml/hstore.sgml *************** b *** 380,386 **** <entry><type>hstore</type></entry> <entry>delete pair with matching key</entry> <entry><literal>delete('a=&gt;1,b=&gt;2','b')</literal></entry> ! <entry><literal>"a"=>"1"</literal></entry> </row> <row> --- 380,386 ---- <entry><type>hstore</type></entry> <entry>delete pair with matching key</entry> <entry><literal>delete('a=&gt;1,b=&gt;2','b')</literal></entry> ! <entry><literal>"a"=&gt;"1"</literal></entry> </row> <row> *************** b *** 388,394 **** <entry><type>hstore</type></entry> <entry>delete pairs with matching keys</entry> <entry><literal>delete('a=&gt;1,b=&gt;2,c=&gt;3',ARRAY['a','b'])</literal></entry> ! <entry><literal>"c"=>"3"</literal></entry> </row> <row> --- 388,394 ---- <entry><type>hstore</type></entry> <entry>delete pairs with matching keys</entry> <entry><literal>delete('a=&gt;1,b=&gt;2,c=&gt;3',ARRAY['a','b'])</literal></entry> ! <entry><literal>"c"=&gt;"3"</literal></entry> </row> <row> *************** b *** 396,402 **** <entry><type>hstore</type></entry> <entry>delete pairs matching those in the second argument</entry> <entry><literal>delete('a=&gt;1,b=&gt;2','a=&gt;4,b=&gt;2'::hstore)</literal></entry> ! <entry><literal>"a"=>"1"</literal></entry> </row> <row> --- 396,402 ---- <entry><type>hstore</type></entry> <entry>delete pairs matching those in the second argument</entry> <entry><literal>delete('a=&gt;1,b=&gt;2','a=&gt;4,b=&gt;2'::hstore)</literal></entry> ! <entry><literal>"a"=&gt;"1"</literal></entry> </row> <row> diff --git a/doc/src/sgml/ltree.sgml b/doc/src/sgml/ltree.sgml index 0a91cd7..06b262b 100644 *** a/doc/src/sgml/ltree.sgml --- b/doc/src/sgml/ltree.sgml *************** a. b. c. d. e. *** 108,114 **** </programlisting> This query will match any label path that: </para> ! <orderedlist numeration='loweralpha'> <listitem> <para> begins with the label <literal>Top</literal> --- 108,114 ---- </programlisting> This query will match any label path that: </para> ! <orderedlist numeration="loweralpha"> <listitem> <para> begins with the label <literal>Top</literal> diff --git a/doc/src/sgml/pgarchivecleanup.sgml b/doc/src/sgml/pgarchivecleanup.sgml index ddffa32..4602544 100644 *** a/doc/src/sgml/pgarchivecleanup.sgml --- b/doc/src/sgml/pgarchivecleanup.sgml *************** pg_archivecleanup: removing file "archi *** 108,114 **** <para>On Linux or Unix systems, you might use: <programlisting> ! archive_cleanup_command = 'pg_archivecleanup -d /mnt/standby/archive %r 2>>cleanup.log' </programlisting> where the archive directory is physically located on the standby server, so that the <varname>archive_command</> is accessing it across NFS, --- 108,114 ---- <para>On Linux or Unix systems, you might use: <programlisting> ! archive_cleanup_command = 'pg_archivecleanup -d /mnt/standby/archive %r 2&gt;&gt;cleanup.log' </programlisting> where the archive directory is physically located on the standby server, so that the <varname>archive_command</> is accessing it across NFS, diff --git a/doc/src/sgml/pgcrypto.sgml b/doc/src/sgml/pgcrypto.sgml index 6b78f2c..9abbc34 100644 *** a/doc/src/sgml/pgcrypto.sgml --- b/doc/src/sgml/pgcrypto.sgml *************** gpg --list-secret-keys *** 827,839 **** <para> To export a public key in ASCII-armor format: <programlisting> ! gpg -a --export KEYID > public.key </programlisting> </para> <para> To export a secret key in ASCII-armor format: <programlisting> ! gpg -a --export-secret-keys KEYID > secret.key </programlisting> </para> <para> --- 827,839 ---- <para> To export a public key in ASCII-armor format: <programlisting> ! gpg -a --export KEYID &gt; public.key </programlisting> </para> <para> To export a secret key in ASCII-armor format: <programlisting> ! gpg -a --export-secret-keys KEYID &gt; secret.key </programlisting> </para> <para> diff --git a/doc/src/sgml/pgstandby.sgml b/doc/src/sgml/pgstandby.sgml index e698cb7..e68bd50 100644 *** a/doc/src/sgml/pgstandby.sgml --- b/doc/src/sgml/pgstandby.sgml *************** pg_standby <optional> <replaceable>optio *** 236,242 **** <programlisting> archive_command = 'cp %p .../archive/%f' ! restore_command = 'pg_standby -d -s 2 -t /tmp/pgsql.trigger.5442 .../archive %f %p %r 2>>standby.log' recovery_end_command = 'rm -f /tmp/pgsql.trigger.5442' </programlisting> --- 236,242 ---- <programlisting> archive_command = 'cp %p .../archive/%f' ! restore_command = 'pg_standby -d -s 2 -t /tmp/pgsql.trigger.5442 .../archive %f %p %r 2&gt;&gt;standby.log' recovery_end_command = 'rm -f /tmp/pgsql.trigger.5442' </programlisting> *************** recovery_end_command = 'rm -f /tmp/pgsql *** 280,286 **** <programlisting> archive_command = 'copy %p ...\\archive\\%f' ! restore_command = 'pg_standby -d -s 5 -t C:\pgsql.trigger.5442 ...\archive %f %p %r 2>>standby.log' recovery_end_command = 'del C:\pgsql.trigger.5442' </programlisting> --- 280,286 ---- <programlisting> archive_command = 'copy %p ...\\archive\\%f' ! restore_command = 'pg_standby -d -s 5 -t C:\pgsql.trigger.5442 ...\archive %f %p %r 2&gt;&gt;standby.log' recovery_end_command = 'del C:\pgsql.trigger.5442' </programlisting> diff --git a/doc/src/sgml/pgstattuple.sgml b/doc/src/sgml/pgstattuple.sgml index a55b35c..cd1302e 100644 *** a/doc/src/sgml/pgstattuple.sgml --- b/doc/src/sgml/pgstattuple.sgml *************** *** 29,35 **** target relation's name (optionally schema-qualified). For example: <programlisting> ! test=> SELECT * FROM pgstattuple('pg_catalog.pg_proc'); -[ RECORD 1 ]------+------- table_len | 458752 tuple_count | 1470 --- 29,35 ---- target relation's name (optionally schema-qualified). For example: <programlisting> ! test=&gt; SELECT * FROM pgstattuple('pg_catalog.pg_proc'); -[ RECORD 1 ]------+------- table_len | 458752 tuple_count | 1470 *************** free_percent | 1.95 *** 142,148 **** <function>pgstatindex</function> returns a record showing information about a B-tree index. For example: <programlisting> ! test=> SELECT * FROM pgstatindex('pg_cast_oid_index'); -[ RECORD 1 ]------+------ version | 2 tree_level | 0 --- 142,148 ---- <function>pgstatindex</function> returns a record showing information about a B-tree index. For example: <programlisting> ! test=&gt; SELECT * FROM pgstatindex('pg_cast_oid_index'); -[ RECORD 1 ]------+------ version | 2 tree_level | 0 diff --git a/doc/src/sgml/plhandler.sgml b/doc/src/sgml/plhandler.sgml index 20021bc..54b88ef 100644 *** a/doc/src/sgml/plhandler.sgml --- b/doc/src/sgml/plhandler.sgml *************** CREATE LANGUAGE plsample *** 166,173 **** to allow language-specific checking to be done during <xref linkend="sql-createfunction">. An inline handler can be provided to allow the language to support ! anonymous code blocks executed via the <xref linkend="sql-do" ! > command. </para> <para> --- 166,172 ---- to allow language-specific checking to be done during <xref linkend="sql-createfunction">. An inline handler can be provided to allow the language to support ! anonymous code blocks executed via the <xref linkend="sql-do"> command. </para> <para> diff --git a/doc/src/sgml/ref/create_table_as.sgml b/doc/src/sgml/ref/create_table_as.sgml index e4797b6..3e501a5 100644 *** a/doc/src/sgml/ref/create_table_as.sgml --- b/doc/src/sgml/ref/create_table_as.sgml *************** CREATE [ [ GLOBAL | LOCAL ] { TEMPORARY *** 204,211 **** <term><replaceable>query</replaceable></term> <listitem> <para> ! A <xref linkend="sql-select" ! >, <link linkend="sql-table">TABLE</link>, or <xref linkend="sql-values"> command, or an <xref linkend="sql-execute"> command --- 204,210 ---- <term><replaceable>query</replaceable></term> <listitem> <para> ! A <xref linkend="sql-select">, <link linkend="sql-table">TABLE</link>, or <xref linkend="sql-values"> command, or an <xref linkend="sql-execute"> command diff --git a/doc/src/sgml/ref/rollback_to.sgml b/doc/src/sgml/ref/rollback_to.sgml index 1b59af6..97036e4 100644 *** a/doc/src/sgml/ref/rollback_to.sgml --- b/doc/src/sgml/ref/rollback_to.sgml *************** ROLLBACK [ WORK | TRANSACTION ] TO [ SAV *** 64,71 **** <title>Notes</title> <para> ! Use <xref linkend="SQL-RELEASE-SAVEPOINT" ! > to destroy a savepoint without discarding the effects of commands executed after it was established. </para> --- 64,70 ---- <title>Notes</title> <para> ! Use <xref linkend="SQL-RELEASE-SAVEPOINT"> to destroy a savepoint without discarding the effects of commands executed after it was established. </para> diff --git a/doc/src/sgml/rules.sgml b/doc/src/sgml/rules.sgml index 1b06519..f54ca91 100644 *** a/doc/src/sgml/rules.sgml --- b/doc/src/sgml/rules.sgml *************** CREATE VIEW phone_number AS *** 1839,1845 **** <programlisting> CREATE FUNCTION tricky(text, text) RETURNS bool AS $$ BEGIN ! RAISE NOTICE '% => %', $1, $2; RETURN true; END $$ LANGUAGE plpgsql COST 0.0000000000000000000001; --- 1839,1845 ---- <programlisting> CREATE FUNCTION tricky(text, text) RETURNS bool AS $$ BEGIN ! RAISE NOTICE '% =&gt; %', $1, $2; RETURN true; END $$ LANGUAGE plpgsql COST 0.0000000000000000000001; diff --git a/doc/src/sgml/runtime.sgml b/doc/src/sgml/runtime.sgml index 8f85df6..31d9347 100644 *** a/doc/src/sgml/runtime.sgml --- b/doc/src/sgml/runtime.sgml *************** sysctl -w vm.overcommit_memory=2 *** 1336,1342 **** thereby guaranteeing it will not be targeted by the OOM killer. The simplest way to do this is to execute <programlisting> ! echo -17 > /proc/self/oom_adj </programlisting> in the postmaster's startup script just before invoking the postmaster. Note that this action must be done as root, or it will have no effect; --- 1336,1342 ---- thereby guaranteeing it will not be targeted by the OOM killer. The simplest way to do this is to execute <programlisting> ! echo -17 &gt; /proc/self/oom_adj </programlisting> in the postmaster's startup script just before invoking the postmaster. Note that this action must be done as root, or it will have no effect; diff --git a/doc/src/sgml/seg.sgml b/doc/src/sgml/seg.sgml index 00bd71d..5d1f546 100644 *** a/doc/src/sgml/seg.sgml --- b/doc/src/sgml/seg.sgml *************** *** 40,46 **** when you fetch it? Watch: <screen> ! test=> select 6.50 :: float8 as "pH"; pH --- 6.5 --- 40,46 ---- when you fetch it? Watch: <screen> ! test=&gt; select 6.50 :: float8 as "pH"; pH --- 6.5 *************** test=> select 6.50 :: float8 as "pH"; *** 66,72 **** Check this out: <screen> ! test=> select '6.25 .. 6.50'::seg as "pH"; pH ------------ 6.25 .. 6.50 --- 66,72 ---- Check this out: <screen> ! test=&gt; select '6.25 .. 6.50'::seg as "pH"; pH ------------ 6.25 .. 6.50 *************** test=> select '6.25 .. 6.50'::seg as "pH *** 359,365 **** boundary if the resulting interval includes a power of ten: <screen> ! postgres=> select '10(+-)1'::seg as seg; seg --------- 9.0 .. 11 -- should be: 9 .. 11 --- 359,365 ---- boundary if the resulting interval includes a power of ten: <screen> ! postgres=&gt; select '10(+-)1'::seg as seg; seg --------- 9.0 .. 11 -- should be: 9 .. 11 diff --git a/doc/src/sgml/textsearch.sgml b/doc/src/sgml/textsearch.sgml index dba5bd6..ef228e3 100644 *** a/doc/src/sgml/textsearch.sgml --- b/doc/src/sgml/textsearch.sgml *************** ts_headline(<optional> <replaceable clas *** 1092,1098 **** if they contain spaces or commas. </para> </listitem> ! <listitem > <para> <literal>MaxWords</>, <literal>MinWords</literal>: these numbers determine the longest and shortest headlines to output. --- 1092,1098 ---- if they contain spaces or commas. </para> </listitem> ! <listitem> <para> <literal>MaxWords</>, <literal>MinWords</literal>: these numbers determine the longest and shortest headlines to output. diff --git a/doc/src/sgml/user-manag.sgml b/doc/src/sgml/user-manag.sgml index d96ff77..8508dd1 100644 *** a/doc/src/sgml/user-manag.sgml --- b/doc/src/sgml/user-manag.sgml *************** CREATE USER <replaceable>name</replaceab *** 244,252 **** A role's attributes can be modified after creation with <command>ALTER ROLE</command>.<indexterm><primary>ALTER ROLE</></> ! See the reference pages for the <xref linkend="sql-createrole" ! > and <xref linkend="sql-alterrole" ! > commands for details. </para> <tip> --- 244,251 ---- A role's attributes can be modified after creation with <command>ALTER ROLE</command>.<indexterm><primary>ALTER ROLE</></> ! See the reference pages for the <xref linkend="sql-createrole"> and ! <xref linkend="sql-alterrole"> commands for details. </para> <tip> diff --git a/doc/src/sgml/xml2.sgml b/doc/src/sgml/xml2.sgml index 47bac31..0ec55fc 100644 *** a/doc/src/sgml/xml2.sgml --- b/doc/src/sgml/xml2.sgml *************** xpath_table('article_id', *** 297,303 **** 'article_xml', 'articles', '/article/author|/article/pages|/article/title', ! 'date_entered > ''2003-01-01'' ') AS t(article_id integer, author text, page_count integer, title text); </programlisting> The <literal>AS</> clause defines the names and types of the columns in the --- 297,303 ---- 'article_xml', 'articles', '/article/author|/article/pages|/article/title', ! 'date_entered &gt; ''2003-01-01'' ') AS t(article_id integer, author text, page_count integer, title text); </programlisting> The <literal>AS</> clause defines the names and types of the columns in the *************** AS t(article_id integer, author text, pa *** 329,335 **** SELECT t.title, p.fullname, p.email FROM xpath_table('article_id', 'article_xml', 'articles', '/article/title|/article/author/@id', ! 'xpath_string(article_xml,''/article/@date'') > ''2003-03-20'' ') AS t(article_id integer, title text, author_id integer), tblPeopleInfo AS p WHERE t.author_id = p.person_id; --- 329,335 ---- SELECT t.title, p.fullname, p.email FROM xpath_table('article_id', 'article_xml', 'articles', '/article/title|/article/author/@id', ! 'xpath_string(article_xml,''/article/@date'') &gt; ''2003-03-20'' ') AS t(article_id integer, title text, author_id integer), tblPeopleInfo AS p WHERE t.author_id = p.person_id;
^ permalink raw reply [nested|flat] 13+ messages in thread

* Re: sgml cleanup: unescaped '>' characters
  2011-08-25 03:28 sgml cleanup: unescaped '>' characters Josh Kupershmidt <schmiddy@gmail.com>
@ 2011-08-27 20:48 ` Peter Eisentraut <peter_e@gmx.net>
  2011-08-29 23:22   ` Re: sgml cleanup: unescaped '>' characters Josh Kupershmidt <schmiddy@gmail.com>
  0 siblings, 1 reply; 13+ messages in thread

From: Peter Eisentraut @ 2011-08-27 20:48 UTC (permalink / raw)
  To: Josh Kupershmidt <schmiddy@gmail.com>; +Cc: pgsql-docs

On ons, 2011-08-24 at 23:28 -0400, Josh Kupershmidt wrote:
> I found myself rewriting the ./src/tools/find_gt_lt script in Perl
> this evening, since the existing script was quite broken (the main
> problem is it's not capable of understanding CDATA or sgml comment
> sections, and hence produces a bunch of noise).
> 
> 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.)

>  * using single quotes instead of double quotes to surround a node
> attribute, as in <orderedlist numeration='loweralpha'>

It would be better if the tool could handle that, because sometimes you
want to use single quotes if the value contains double quotes.

> as well as seemingly-invalid SGML, such as using '>' unescaped inside
> normal SGML entries.

Unescaped > is valid, AFAIK.





^ permalink  raw  reply  [nested|flat] 13+ messages in thread

* Re: sgml cleanup: unescaped '>' characters
  2011-08-25 03:28 sgml cleanup: unescaped '>' characters Josh Kupershmidt <schmiddy@gmail.com>
  2011-08-27 20:48 ` Re: sgml cleanup: unescaped '>' characters Peter Eisentraut <peter_e@gmx.net>
@ 2011-08-29 23:22   ` Josh Kupershmidt <schmiddy@gmail.com>
  2011-08-30 17:36     ` Re: sgml cleanup: unescaped '>' characters Peter Eisentraut <peter_e@gmx.net>
  0 siblings, 1 reply; 13+ messages in thread

From: Josh Kupershmidt @ 2011-08-29 23:22 UTC (permalink / raw)
  To: Peter Eisentraut <peter_e@gmx.net>; +Cc: pgsql-docs

On Sat, Aug 27, 2011 at 3:48 PM, Peter Eisentraut <peter_e@gmx.net> wrote:
> On ons, 2011-08-24 at 23:28 -0400, Josh Kupershmidt wrote:
>> I found myself rewriting the ./src/tools/find_gt_lt script in Perl
>> this evening, since the existing script was quite broken (the main
>> problem is it's not capable of understanding CDATA or sgml comment
>> sections, and hence produces a bunch of noise).
>>
>> 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 <orderedlist numeration='loweralpha'>
>
> 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.

>> 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?

Josh

[1] http://books.google.com/books?id=OyJHFJsnh10C&lpg=PA229&ots=DGkYDdvbhE&pg=PA73#v=onepage...



^ permalink  raw  reply  [nested|flat] 13+ messages in thread

* Re: sgml cleanup: unescaped '>' characters
  2011-08-25 03:28 sgml cleanup: unescaped '>' characters Josh Kupershmidt <schmiddy@gmail.com>
  2011-08-27 20:48 ` Re: sgml cleanup: unescaped '>' characters Peter Eisentraut <peter_e@gmx.net>
  2011-08-29 23:22   ` Re: sgml cleanup: unescaped '>' characters Josh Kupershmidt <schmiddy@gmail.com>
@ 2011-08-30 17:36     ` Peter Eisentraut <peter_e@gmx.net>
  2011-09-01 14:17       ` Re: sgml cleanup: unescaped '>' characters Bruce Momjian <bruce@momjian.us>
  0 siblings, 1 reply; 13+ messages in thread

From: Peter Eisentraut @ 2011-08-30 17:36 UTC (permalink / raw)
  To: Josh Kupershmidt <schmiddy@gmail.com>; +Cc: pgsql-docs

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 <orderedlist numeration='loweralpha'>
> >
> > 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...

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.






^ permalink  raw  reply  [nested|flat] 13+ messages in thread

* Re: sgml cleanup: unescaped '>' characters
  2011-08-25 03:28 sgml cleanup: unescaped '>' characters Josh Kupershmidt <schmiddy@gmail.com>
  2011-08-27 20:48 ` Re: sgml cleanup: unescaped '>' characters Peter Eisentraut <peter_e@gmx.net>
  2011-08-29 23:22   ` Re: sgml cleanup: unescaped '>' characters Josh Kupershmidt <schmiddy@gmail.com>
  2011-08-30 17:36     ` Re: sgml cleanup: unescaped '>' characters Peter Eisentraut <peter_e@gmx.net>
@ 2011-09-01 14:17       ` Bruce Momjian <bruce@momjian.us>
  2011-09-01 18:14         ` Re: sgml cleanup: unescaped '>' characters Peter Eisentraut <peter_e@gmx.net>
  0 siblings, 1 reply; 13+ messages in thread

From: Bruce Momjian @ 2011-09-01 14:17 UTC (permalink / raw)
  To: Peter Eisentraut <peter_e@gmx.net>; +Cc: Josh Kupershmidt <schmiddy@gmail.com>; pgsql-docs

Peter Eisentraut wrote:
> > >> 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...
> 
> 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.

I have updated the scripts and instructions accordingly.

-- 
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + It's impossible for everything to be true. +



^ permalink  raw  reply  [nested|flat] 13+ messages in thread

* Re: sgml cleanup: unescaped '>' characters
  2011-08-25 03:28 sgml cleanup: unescaped '>' characters Josh Kupershmidt <schmiddy@gmail.com>
  2011-08-27 20:48 ` Re: sgml cleanup: unescaped '>' characters Peter Eisentraut <peter_e@gmx.net>
  2011-08-29 23:22   ` Re: sgml cleanup: unescaped '>' characters Josh Kupershmidt <schmiddy@gmail.com>
  2011-08-30 17:36     ` Re: sgml cleanup: unescaped '>' characters Peter Eisentraut <peter_e@gmx.net>
  2011-09-01 14:17       ` Re: sgml cleanup: unescaped '>' characters Bruce Momjian <bruce@momjian.us>
@ 2011-09-01 18:14         ` Peter Eisentraut <peter_e@gmx.net>
  2011-09-01 18:17           ` Re: sgml cleanup: unescaped '>' characters Bruce Momjian <bruce@momjian.us>
  0 siblings, 1 reply; 13+ messages in thread

From: Peter Eisentraut @ 2011-09-01 18:14 UTC (permalink / raw)
  To: Bruce Momjian <bruce@momjian.us>; +Cc: Josh Kupershmidt <schmiddy@gmail.com>; pgsql-docs

On tor, 2011-09-01 at 10:17 -0400, Bruce Momjian wrote:
> Peter Eisentraut wrote:
> > > >> 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...
> > 
> > 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.
> 
> I have updated the scripts and instructions accordingly.

That still leaves open why we bother about escaping <.




^ permalink  raw  reply  [nested|flat] 13+ messages in thread

* Re: sgml cleanup: unescaped '>' characters
  2011-08-25 03:28 sgml cleanup: unescaped '>' characters Josh Kupershmidt <schmiddy@gmail.com>
  2011-08-27 20:48 ` Re: sgml cleanup: unescaped '>' characters Peter Eisentraut <peter_e@gmx.net>
  2011-08-29 23:22   ` Re: sgml cleanup: unescaped '>' characters Josh Kupershmidt <schmiddy@gmail.com>
  2011-08-30 17:36     ` Re: sgml cleanup: unescaped '>' characters Peter Eisentraut <peter_e@gmx.net>
  2011-09-01 14:17       ` Re: sgml cleanup: unescaped '>' characters Bruce Momjian <bruce@momjian.us>
  2011-09-01 18:14         ` Re: sgml cleanup: unescaped '>' characters Peter Eisentraut <peter_e@gmx.net>
@ 2011-09-01 18:17           ` Bruce Momjian <bruce@momjian.us>
  2011-09-01 21:16             ` Re: sgml cleanup: unescaped '>' characters Peter Eisentraut <peter_e@gmx.net>
  0 siblings, 1 reply; 13+ messages in thread

From: Bruce Momjian @ 2011-09-01 18:17 UTC (permalink / raw)
  To: Peter Eisentraut <peter_e@gmx.net>; +Cc: Josh Kupershmidt <schmiddy@gmail.com>; pgsql-docs

Peter Eisentraut wrote:
> On tor, 2011-09-01 at 10:17 -0400, Bruce Momjian wrote:
> > Peter Eisentraut wrote:
> > > > >> 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...
> > > 
> > > 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.
> > 
> > I have updated the scripts and instructions accordingly.
> 
> That still leaves open why we bother about escaping <.

The problem is that I often add SGML that has:

	if (1 < 0) ...

I need something to warn me about those, especially in the release
notes.

-- 
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + It's impossible for everything to be true. +



^ permalink  raw  reply  [nested|flat] 13+ messages in thread

* Re: sgml cleanup: unescaped '>' characters
  2011-08-25 03:28 sgml cleanup: unescaped '>' characters Josh Kupershmidt <schmiddy@gmail.com>
  2011-08-27 20:48 ` Re: sgml cleanup: unescaped '>' characters Peter Eisentraut <peter_e@gmx.net>
  2011-08-29 23:22   ` Re: sgml cleanup: unescaped '>' characters Josh Kupershmidt <schmiddy@gmail.com>
  2011-08-30 17:36     ` Re: sgml cleanup: unescaped '>' characters Peter Eisentraut <peter_e@gmx.net>
  2011-09-01 14:17       ` Re: sgml cleanup: unescaped '>' characters Bruce Momjian <bruce@momjian.us>
  2011-09-01 18:14         ` Re: sgml cleanup: unescaped '>' characters Peter Eisentraut <peter_e@gmx.net>
  2011-09-01 18:17           ` Re: sgml cleanup: unescaped '>' characters Bruce Momjian <bruce@momjian.us>
@ 2011-09-01 21:16             ` Peter Eisentraut <peter_e@gmx.net>
  2011-09-01 21:31               ` Re: sgml cleanup: unescaped '>' characters Bruce Momjian <bruce@momjian.us>
  0 siblings, 1 reply; 13+ messages in thread

From: Peter Eisentraut @ 2011-09-01 21:16 UTC (permalink / raw)
  To: Bruce Momjian <bruce@momjian.us>; +Cc: Josh Kupershmidt <schmiddy@gmail.com>; pgsql-docs

On tor, 2011-09-01 at 14:17 -0400, Bruce Momjian wrote:
> > That still leaves open why we bother about escaping <.
> 
> The problem is that I often add SGML that has:
> 
>         if (1 < 0) ...
> 
> I need something to warn me about those, especially in the release
> notes.

Why do you need to be warned about that?





^ permalink  raw  reply  [nested|flat] 13+ messages in thread

* Re: sgml cleanup: unescaped '>' characters
  2011-08-25 03:28 sgml cleanup: unescaped '>' characters Josh Kupershmidt <schmiddy@gmail.com>
  2011-08-27 20:48 ` Re: sgml cleanup: unescaped '>' characters Peter Eisentraut <peter_e@gmx.net>
  2011-08-29 23:22   ` Re: sgml cleanup: unescaped '>' characters Josh Kupershmidt <schmiddy@gmail.com>
  2011-08-30 17:36     ` Re: sgml cleanup: unescaped '>' characters Peter Eisentraut <peter_e@gmx.net>
  2011-09-01 14:17       ` Re: sgml cleanup: unescaped '>' characters Bruce Momjian <bruce@momjian.us>
  2011-09-01 18:14         ` Re: sgml cleanup: unescaped '>' characters Peter Eisentraut <peter_e@gmx.net>
  2011-09-01 18:17           ` Re: sgml cleanup: unescaped '>' characters Bruce Momjian <bruce@momjian.us>
  2011-09-01 21:16             ` Re: sgml cleanup: unescaped '>' characters Peter Eisentraut <peter_e@gmx.net>
@ 2011-09-01 21:31               ` Bruce Momjian <bruce@momjian.us>
  2011-09-02 14:37                 ` Re: sgml cleanup: unescaped '>' characters Peter Eisentraut <peter_e@gmx.net>
  0 siblings, 1 reply; 13+ messages in thread

From: Bruce Momjian @ 2011-09-01 21:31 UTC (permalink / raw)
  To: Peter Eisentraut <peter_e@gmx.net>; +Cc: Josh Kupershmidt <schmiddy@gmail.com>; pgsql-docs

Peter Eisentraut wrote:
> On tor, 2011-09-01 at 14:17 -0400, Bruce Momjian wrote:
> > > That still leaves open why we bother about escaping <.
> > 
> > The problem is that I often add SGML that has:
> > 
> >         if (1 < 0) ...
> > 
> > I need something to warn me about those, especially in the release
> > notes.
> 
> Why do you need to be warned about that?

If I have:

	if (1 < fred)

it will think "fred" is a SGML tag, no?

-- 
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + It's impossible for everything to be true. +



^ permalink  raw  reply  [nested|flat] 13+ messages in thread

* Re: sgml cleanup: unescaped '>' characters
  2011-08-25 03:28 sgml cleanup: unescaped '>' characters Josh Kupershmidt <schmiddy@gmail.com>
  2011-08-27 20:48 ` Re: sgml cleanup: unescaped '>' characters Peter Eisentraut <peter_e@gmx.net>
  2011-08-29 23:22   ` Re: sgml cleanup: unescaped '>' characters Josh Kupershmidt <schmiddy@gmail.com>
  2011-08-30 17:36     ` Re: sgml cleanup: unescaped '>' characters Peter Eisentraut <peter_e@gmx.net>
  2011-09-01 14:17       ` Re: sgml cleanup: unescaped '>' characters Bruce Momjian <bruce@momjian.us>
  2011-09-01 18:14         ` Re: sgml cleanup: unescaped '>' characters Peter Eisentraut <peter_e@gmx.net>
  2011-09-01 18:17           ` Re: sgml cleanup: unescaped '>' characters Bruce Momjian <bruce@momjian.us>
  2011-09-01 21:16             ` Re: sgml cleanup: unescaped '>' characters Peter Eisentraut <peter_e@gmx.net>
  2011-09-01 21:31               ` Re: sgml cleanup: unescaped '>' characters Bruce Momjian <bruce@momjian.us>
@ 2011-09-02 14:37                 ` Peter Eisentraut <peter_e@gmx.net>
  2011-09-03 20:47                   ` Re: sgml cleanup: unescaped '>' characters Bruce Momjian <bruce@momjian.us>
  0 siblings, 1 reply; 13+ messages in thread

From: Peter Eisentraut @ 2011-09-02 14:37 UTC (permalink / raw)
  To: Bruce Momjian <bruce@momjian.us>; +Cc: Josh Kupershmidt <schmiddy@gmail.com>; pgsql-docs

On tor, 2011-09-01 at 17:31 -0400, Bruce Momjian wrote:
> Peter Eisentraut wrote:
> > On tor, 2011-09-01 at 14:17 -0400, Bruce Momjian wrote:
> > > > That still leaves open why we bother about escaping <.
> > > 
> > > The problem is that I often add SGML that has:
> > > 
> > >         if (1 < 0) ...
> > > 
> > > I need something to warn me about those, especially in the release
> > > notes.
> > 
> > Why do you need to be warned about that?
> 
> If I have:
> 
> 	if (1 < fred)
> 
> it will think "fred" is a SGML tag, no?

No, a < followed by a space is not a tag, it's character data.  If it
thought it were a tag, it would complain.




^ permalink  raw  reply  [nested|flat] 13+ messages in thread

* Re: sgml cleanup: unescaped '>' characters
  2011-08-25 03:28 sgml cleanup: unescaped '>' characters Josh Kupershmidt <schmiddy@gmail.com>
  2011-08-27 20:48 ` Re: sgml cleanup: unescaped '>' characters Peter Eisentraut <peter_e@gmx.net>
  2011-08-29 23:22   ` Re: sgml cleanup: unescaped '>' characters Josh Kupershmidt <schmiddy@gmail.com>
  2011-08-30 17:36     ` Re: sgml cleanup: unescaped '>' characters Peter Eisentraut <peter_e@gmx.net>
  2011-09-01 14:17       ` Re: sgml cleanup: unescaped '>' characters Bruce Momjian <bruce@momjian.us>
  2011-09-01 18:14         ` Re: sgml cleanup: unescaped '>' characters Peter Eisentraut <peter_e@gmx.net>
  2011-09-01 18:17           ` Re: sgml cleanup: unescaped '>' characters Bruce Momjian <bruce@momjian.us>
  2011-09-01 21:16             ` Re: sgml cleanup: unescaped '>' characters Peter Eisentraut <peter_e@gmx.net>
  2011-09-01 21:31               ` Re: sgml cleanup: unescaped '>' characters Bruce Momjian <bruce@momjian.us>
  2011-09-02 14:37                 ` Re: sgml cleanup: unescaped '>' characters Peter Eisentraut <peter_e@gmx.net>
@ 2011-09-03 20:47                   ` Bruce Momjian <bruce@momjian.us>
  2011-09-03 22:22                     ` Re: sgml cleanup: unescaped '>' characters Peter Eisentraut <peter_e@gmx.net>
  0 siblings, 1 reply; 13+ messages in thread

From: Bruce Momjian @ 2011-09-03 20:47 UTC (permalink / raw)
  To: Peter Eisentraut <peter_e@gmx.net>; +Cc: Josh Kupershmidt <schmiddy@gmail.com>; pgsql-docs

Peter Eisentraut wrote:
> On tor, 2011-09-01 at 17:31 -0400, Bruce Momjian wrote:
> > Peter Eisentraut wrote:
> > > On tor, 2011-09-01 at 14:17 -0400, Bruce Momjian wrote:
> > > > > That still leaves open why we bother about escaping <.
> > > > 
> > > > The problem is that I often add SGML that has:
> > > > 
> > > >         if (1 < 0) ...
> > > > 
> > > > I need something to warn me about those, especially in the release
> > > > notes.
> > > 
> > > Why do you need to be warned about that?
> > 
> > If I have:
> > 
> > 	if (1 < fred)
> > 
> > it will think "fred" is a SGML tag, no?
> 
> No, a < followed by a space is not a tag, it's character data.  If it
> thought it were a tag, it would complain.

Sometimes it is '<' (in single quotes), which I thought would be a
problem.

-- 
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + It's impossible for everything to be true. +



^ permalink  raw  reply  [nested|flat] 13+ messages in thread

* Re: sgml cleanup: unescaped '>' characters
  2011-08-25 03:28 sgml cleanup: unescaped '>' characters Josh Kupershmidt <schmiddy@gmail.com>
  2011-08-27 20:48 ` Re: sgml cleanup: unescaped '>' characters Peter Eisentraut <peter_e@gmx.net>
  2011-08-29 23:22   ` Re: sgml cleanup: unescaped '>' characters Josh Kupershmidt <schmiddy@gmail.com>
  2011-08-30 17:36     ` Re: sgml cleanup: unescaped '>' characters Peter Eisentraut <peter_e@gmx.net>
  2011-09-01 14:17       ` Re: sgml cleanup: unescaped '>' characters Bruce Momjian <bruce@momjian.us>
  2011-09-01 18:14         ` Re: sgml cleanup: unescaped '>' characters Peter Eisentraut <peter_e@gmx.net>
  2011-09-01 18:17           ` Re: sgml cleanup: unescaped '>' characters Bruce Momjian <bruce@momjian.us>
  2011-09-01 21:16             ` Re: sgml cleanup: unescaped '>' characters Peter Eisentraut <peter_e@gmx.net>
  2011-09-01 21:31               ` Re: sgml cleanup: unescaped '>' characters Bruce Momjian <bruce@momjian.us>
  2011-09-02 14:37                 ` Re: sgml cleanup: unescaped '>' characters Peter Eisentraut <peter_e@gmx.net>
  2011-09-03 20:47                   ` Re: sgml cleanup: unescaped '>' characters Bruce Momjian <bruce@momjian.us>
@ 2011-09-03 22:22                     ` Peter Eisentraut <peter_e@gmx.net>
  2011-09-03 23:09                       ` Re: sgml cleanup: unescaped '>' characters Bruce Momjian <bruce@momjian.us>
  0 siblings, 1 reply; 13+ messages in thread

From: Peter Eisentraut @ 2011-09-03 22:22 UTC (permalink / raw)
  To: Bruce Momjian <bruce@momjian.us>; +Cc: Josh Kupershmidt <schmiddy@gmail.com>; pgsql-docs

On lör, 2011-09-03 at 16:47 -0400, Bruce Momjian wrote:
> Peter Eisentraut wrote:
> > On tor, 2011-09-01 at 17:31 -0400, Bruce Momjian wrote:
> > > Peter Eisentraut wrote:
> > > > On tor, 2011-09-01 at 14:17 -0400, Bruce Momjian wrote:
> > > > > > That still leaves open why we bother about escaping <.
> > > > > 
> > > > > The problem is that I often add SGML that has:
> > > > > 
> > > > >         if (1 < 0) ...
> > > > > 
> > > > > I need something to warn me about those, especially in the release
> > > > > notes.
> > > > 
> > > > Why do you need to be warned about that?
> > > 
> > > If I have:
> > > 
> > > 	if (1 < fred)
> > > 
> > > it will think "fred" is a SGML tag, no?
> > 
> > No, a < followed by a space is not a tag, it's character data.  If it
> > thought it were a tag, it would complain.
> 
> Sometimes it is '<' (in single quotes), which I thought would be a
> problem.

The bottom line is, the SGML parser can figure that out itself, and if
it has a problem, it will complain.  We don't need to second guess it
with regular expressions that are handcrafted out of thin air.

I was hoping you would remember whether you initially put this in
because of some tool problem.  But if we are not finding any supporting
evidence, I would suggest that we just scrap this thing entirely.




^ permalink  raw  reply  [nested|flat] 13+ messages in thread

* Re: sgml cleanup: unescaped '>' characters
  2011-08-25 03:28 sgml cleanup: unescaped '>' characters Josh Kupershmidt <schmiddy@gmail.com>
  2011-08-27 20:48 ` Re: sgml cleanup: unescaped '>' characters Peter Eisentraut <peter_e@gmx.net>
  2011-08-29 23:22   ` Re: sgml cleanup: unescaped '>' characters Josh Kupershmidt <schmiddy@gmail.com>
  2011-08-30 17:36     ` Re: sgml cleanup: unescaped '>' characters Peter Eisentraut <peter_e@gmx.net>
  2011-09-01 14:17       ` Re: sgml cleanup: unescaped '>' characters Bruce Momjian <bruce@momjian.us>
  2011-09-01 18:14         ` Re: sgml cleanup: unescaped '>' characters Peter Eisentraut <peter_e@gmx.net>
  2011-09-01 18:17           ` Re: sgml cleanup: unescaped '>' characters Bruce Momjian <bruce@momjian.us>
  2011-09-01 21:16             ` Re: sgml cleanup: unescaped '>' characters Peter Eisentraut <peter_e@gmx.net>
  2011-09-01 21:31               ` Re: sgml cleanup: unescaped '>' characters Bruce Momjian <bruce@momjian.us>
  2011-09-02 14:37                 ` Re: sgml cleanup: unescaped '>' characters Peter Eisentraut <peter_e@gmx.net>
  2011-09-03 20:47                   ` Re: sgml cleanup: unescaped '>' characters Bruce Momjian <bruce@momjian.us>
  2011-09-03 22:22                     ` Re: sgml cleanup: unescaped '>' characters Peter Eisentraut <peter_e@gmx.net>
@ 2011-09-03 23:09                       ` Bruce Momjian <bruce@momjian.us>
  0 siblings, 0 replies; 13+ messages in thread

From: Bruce Momjian @ 2011-09-03 23:09 UTC (permalink / raw)
  To: Peter Eisentraut <peter_e@gmx.net>; +Cc: Josh Kupershmidt <schmiddy@gmail.com>; pgsql-docs

Peter Eisentraut wrote:
> On l?r, 2011-09-03 at 16:47 -0400, Bruce Momjian wrote:
> > Peter Eisentraut wrote:
> > > On tor, 2011-09-01 at 17:31 -0400, Bruce Momjian wrote:
> > > > Peter Eisentraut wrote:
> > > > > On tor, 2011-09-01 at 14:17 -0400, Bruce Momjian wrote:
> > > > > > > That still leaves open why we bother about escaping <.
> > > > > > 
> > > > > > The problem is that I often add SGML that has:
> > > > > > 
> > > > > >         if (1 < 0) ...
> > > > > > 
> > > > > > I need something to warn me about those, especially in the release
> > > > > > notes.
> > > > > 
> > > > > Why do you need to be warned about that?
> > > > 
> > > > If I have:
> > > > 
> > > > 	if (1 < fred)
> > > > 
> > > > it will think "fred" is a SGML tag, no?
> > > 
> > > No, a < followed by a space is not a tag, it's character data.  If it
> > > thought it were a tag, it would complain.
> > 
> > Sometimes it is '<' (in single quotes), which I thought would be a
> > problem.
> 
> The bottom line is, the SGML parser can figure that out itself, and if
> it has a problem, it will complain.  We don't need to second guess it
> with regular expressions that are handcrafted out of thin air.
> 
> I was hoping you would remember whether you initially put this in
> because of some tool problem.  But if we are not finding any supporting
> evidence, I would suggest that we just scrap this thing entirely.

I put it in to warn about release.sgml markup problems, so I properly
escaped all non-tag '>' and '<' characters.

I have removed the tool.  We can always re-add it if we find it is
needed.

-- 
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + It's impossible for everything to be true. +



^ permalink  raw  reply  [nested|flat] 13+ messages in thread


end of thread, other threads:[~2011-09-03 23:09 UTC | newest]

Thread overview: 13+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2011-08-25 03:28 sgml cleanup: unescaped '>' characters Josh Kupershmidt <schmiddy@gmail.com>
2011-08-27 20:48 ` Peter Eisentraut <peter_e@gmx.net>
2011-08-29 23:22   ` Josh Kupershmidt <schmiddy@gmail.com>
2011-08-30 17:36     ` Peter Eisentraut <peter_e@gmx.net>
2011-09-01 14:17       ` Bruce Momjian <bruce@momjian.us>
2011-09-01 18:14         ` Peter Eisentraut <peter_e@gmx.net>
2011-09-01 18:17           ` Bruce Momjian <bruce@momjian.us>
2011-09-01 21:16             ` Peter Eisentraut <peter_e@gmx.net>
2011-09-01 21:31               ` Bruce Momjian <bruce@momjian.us>
2011-09-02 14:37                 ` Peter Eisentraut <peter_e@gmx.net>
2011-09-03 20:47                   ` Bruce Momjian <bruce@momjian.us>
2011-09-03 22:22                     ` Peter Eisentraut <peter_e@gmx.net>
2011-09-03 23:09                       ` Bruce Momjian <bruce@momjian.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox