Path: 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: 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 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 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" ;; 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 Naggum Professional Programmer +47-2-836-863 Naggum Software Electronic Text 0118 OSLO, NORWAY Computer Communications