Re: space

Joe English (joe@trystero.art.com)
Tue, 24 Sep 1996 14:36:20 PDT


Message-Id: <9609242136.AA05173@trystero.art.com>
To: www-html@w3.org
Subject: Re: space
In-Reply-To: <199609241115.MAA10999@curia.ucc.ie>
Date: Tue, 24 Sep 1996 14:36:20 PDT
From: Joe English <joe@trystero.art.com>


Peter Flynn <pflynn@curia.ucc.ie> wrote:

> Parsing the file
>
> 	<!doctype html system "html3.dtd">
> 	<html><head><title>Test</title></head><body>
> 	<pre>
> 	PROCEDURE frob
> 	BEGIN
> 	  IF silly <> foolish THEN
> 	    WRITELN("Oooops.");
> 	END
> 	</pre></body></html>
>
> produces the following from sgmls:
>
> 	sgmls: SGML error at test.html, line 6 at ">":
> 	       PRE end-tag implied by short start-tag (no GI); not minimizable
>
> In other words, because PRE allows markup within it, any "<" in PRE is
> expected to be the start of a valid element, and thus to be followed by
> [-\.a-zA-Z]+

Not exactly...  "<" is a delimiter-in-context, which means
that it's only recognized as markup when it's followed by
certain other things.  In this case, one of the things that
can follow it is the TAGC delimiter ">".  (The sequence "<>"
is an "empty start-tag".  Don't ask...)

Constructs like:

	<pre>
	    if x <= y & x < z
	</pre>

will pass through an SGML parser without an error
(though it's no doubt a better idea to type


	<pre>
	    if x &lt;= y &amp; x < z
	</pre>

instead, if for no other reason than it's easier
to remember to always use &lt; than to remember
all of SGML's delimiter recognition rules.)



--Joe English

  joe@art.com