Re: space

Joe English (
Tue, 24 Sep 1996 14:36:20 PDT

Message-Id: <>
Subject: Re: space
In-Reply-To: <>
Date: Tue, 24 Sep 1996 14:36:20 PDT
From: Joe English <>

Peter Flynn <> wrote:

> Parsing the file
> 	<!doctype html system "html3.dtd">
> 	<html><head><title>Test</title></head><body>
> 	<pre>
> 	  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:

	    if x <= y & x < z

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

	    if x &lt;= y &amp; x < z

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