🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.text.sgml
Article #551

Re: Short Ref's Reparsed?

#551
From: Erik Naggum
Date: Mon, 24 Jun 1991 23:16
42 lines
1979 bytes
I'll try to avoid quoting stuff, this time.

Archimedes is rumored to have shouted Eureka! and streak through his
native little town upon discovering a basic law of nature.  I gener-
ally dislike clothes, and I did shout Eureka today, so there must be
a newly discovered law of nature somewhere...

Section 9.4 Entity References contains this little paragraph, which is
worth the above excursion:

	A reference to an entity that has already been refrenced and
	has not yet ended is invalid (i.e. entities cannot be
	refrenced recursively).

So the much publicized example

	<!ENTITY a "aa">
	<!SHORTREF map "aa" a>

is invalid, which will be discovered when the map is in use.  Why?
Let's look at what happens, once again, when "aa" is parsed as PCDATA:

1.	"aa" -> "&a;"
2.	"&a;" -> "aa<Ee>"	;; entity a is now open
3.	"aa" -> "&a;"		;; new reference to entity a
4.	Kaboom!			;; see 348:10 for details...

And as if that wasn't enough, 9.4.1 Quanties [348:13] takes care of
the infinite recursion, anyhow:

	The number of open entities ... cannot exceed the "ENTLVL"
	quantity.

ENTLVL defaults to 16.

This eliminates at least a fraction of our problems.

</Erik>
--
Erik Naggum             Professional Programmer            +47-2-836-863
Naggum Software             Electronic Text             <erik@naggum.no>
0118 OSLO, NORWAY       Computer Communications        <enag@ifi.uio.no>
Technical Details
Message-ID: <ENAG.91Jun25011614@gyda.ifi.uio.no>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!uupsi!sunic!sics.se!ifi.uio.no!enag
References: <489@salt.bellcore.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!uupsi!sunic!sics.se!ifi.uio.no!enag
From: enag@ifi.uio.no (Erik Naggum)
Newsgroups: comp.text.sgml
Subject: Re: Short Ref's Reparsed?
Message-ID: <ENAG.91Jun25011614@gyda.ifi.uio.no>
Date: 24 Jun 91 23:16:17 GMT
References: <489@salt.bellcore.com>
Sender: enag@ifi.uio.no (Erik Naggum)
Organization: Naggum Software, Oslo, Norway
Lines: 42
Nntp-Posting-Host: gyda.ifi.uio.no
In-Reply-To: jxr@thumper.bellcore.com's message of 24 Jun 91 16: 47:29 GMT
Originator: enag@gyda.ifi.uio.no