sgml and "empty" closing tags

Поиск
Список
Период
Сортировка
Искать

sgml and "empty" closing tags

От:
Alex Hunsaker <badalex@gmail.com>
Дата:
While looking over the writable cte patch I noticed queries.sgml has
lots of things in the form "FROM</>".  I tried various
googles to see if </> is some kind of sgml/xml shorthand for close the
last opened tag.  But alas, nothing found.  Bad google foo?

Should we change those to be the right closing tag? aka 

Re: sgml and "empty" closing tags

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Alex Hunsaker  writes:
> While looking over the writable cte patch I noticed queries.sgml has
> lots of things in the form "FROM</>".  I tried various
> googles to see if </> is some kind of sgml/xml shorthand for close the
> last opened tag.  But alas, nothing found.  Bad google foo?

Apparently --- it's perfectly legal in SGML.  (I think not in XML.)

> Should we change those to be the right closing tag? aka 

You'd be wasting your time.

I don't think it's good style to use </> when the opening tag is far
away or there are other tags between.  But for examples like the one
you cite, it's perfectly reasonable.
		regards, tom lane

Re: sgml and "empty" closing tags

От:
Andrew Dunstan <andrew@dunslane.net>
Дата:


Tom Lane wrote:
> Alex Hunsaker  writes:
>   
>> While looking over the writable cte patch I noticed queries.sgml has
>> lots of things in the form "FROM</>".  I tried various
>> googles to see if </> is some kind of sgml/xml shorthand for close the
>> last opened tag.  But alas, nothing found.  Bad google foo?
>>     
>
> Apparently --- it's perfectly legal in SGML.  (I think not in XML.)
>   

Correct on both counts.

cheers

andrew

Re: sgml and "empty" closing tags

От:
Alex Hunsaker <badalex@gmail.com>
Дата:
On Mon, Nov 16, 2009 at 20:41, Tom Lane  wrote:
> Apparently --- it's perfectly legal in SGML.  (I think not in XML.)

Cool.  Thanks!

BTW anyone know how to escape < and > for google? I tried searching
for it-- but ran into a chick and egg situation.  So the I tried
various forms of "google search left angle bracket", quotes,
backslashes and "+". no luck

Re: sgml and "empty" closing tags

От:
Robert Haas <robertmhaas@gmail.com>
Дата:
On Mon, Nov 16, 2009 at 10:54 PM, Alex Hunsaker  wrote:
> On Mon, Nov 16, 2009 at 20:41, Tom Lane  wrote:
>> Apparently --- it's perfectly legal in SGML.  (I think not in XML.)
>
> Cool.  Thanks!
>
> BTW anyone know how to escape < and > for google? I tried searching
> for it-- but ran into a chick and egg situation.  So the I tried
> various forms of "google search left angle bracket", quotes,
> backslashes and "+". no luck

I don't think you can.  I gather that the Google text search algorithm
is word-based.  It seems like you can't search for things that it
doesn't consider to be words.  It has a pretty expansive notion of
what a word is (like "2a43" is a word, for example) but any non-word
characters are ignored (so, for example, "2a43$" returns the same hits
as "2a43").

...Robert

Re: sgml and "empty" closing tags

От:
Peter Eisentraut <peter_e@gmx.net>
Дата:
On mån, 2009-11-16 at 20:30 -0700, Alex Hunsaker wrote:
> While looking over the writable cte patch I noticed queries.sgml has
> lots of things in the form "FROM</>".  I tried various
> googles to see if </> is some kind of sgml/xml shorthand for close the
> last opened tag.  But alas, nothing found.  Bad google foo?

If you have DocBook installed locally, you should have a file called
docbook.dcl, which contains the "SGML declaration" of DocBook, and
somewhere down contains this:

FEATURES
        MINIMIZE                 DATATAG  NO                 OMITTAG  NO                 RANK     NO                 SHORTTAG YES

So if you google for something like "markup minimization shorttag", you
can find more information.

For amusement, contrast this with the SGML declaration of HTML:

FEATURES MINIMIZE   DATATAG  NO   OMITTAG  YES  <-- This is why you can omit , for example.   RANK     NO   SHORTTAG YES



Re: sgml and "empty" closing tags

От:
Euler Taveira de Oliveira <euler@timbira.com>
Дата:
Alex Hunsaker escreveu:
> BTW anyone know how to escape < and > for google?
> 
You can escape < and > using < and >, respectively.


--  Euler Taveira de Oliveira http://www.timbira.com/

Re: sgml and "empty" closing tags

От:
Robert Haas <robertmhaas@gmail.com>
Дата:
On Tue, Nov 17, 2009 at 6:39 PM, Euler Taveira de Oliveira
 wrote:
> Alex Hunsaker escreveu:
>> BTW anyone know how to escape < and > for google?
>>
> You can escape < and > using < and >, respectively.

Searching for <foo looks for documents containing "lt" and "foo",
not documents containing "

Re: sgml and "empty" closing tags

От:
Euler Taveira de Oliveira <euler@timbira.com>
Дата:
Robert Haas escreveu:
> On Tue, Nov 17, 2009 at 6:39 PM, Euler Taveira de Oliveira
>  wrote:
>> Alex Hunsaker escreveu:
>>> BTW anyone know how to escape < and > for google?
>>>
>> You can escape < and > using < and >, respectively.
> 
> Searching for <foo looks for documents containing "lt" and "foo",
> not documents containing "
Ops, didn't read 'for google'. I thought that the OP was asking about escaping
those identifiers in SGML.


--  Euler Taveira de Oliveira http://www.timbira.com/

FAQ