🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.text.sgml
Article #537

Re: Short Ref's Reparsed?

#537
From: Jonathan Rosenberg
Date: Wed, 19 Jun 1991 20:01
76 lines
2163 bytes
From: erik@naggum.no (Erik Naggum)
Newsgroups: comp.text.sgml
Subject: Re: Short Ref's Reparsed?
Date: 19 Jun 91 14:36:47 GMT

> Jonathan Rosenberg <jxr@thumper.bellcore.com> writes:
> |
> |   If you specify a short reference map, e.g.,
> |
> |   <!ENTITY aa "a">
> |   <!SHORTREF foo "aa" a>
> |   
> |   what happens to the modified text after the substitution is made?

> . . .

> Your example does not say what you intended.  The short reference
> mapping declaration refers to an entity "a", but you have defined
> entity "aa".  If you meant

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

Yes, this is what I meant.

> this would map the first, longest occurence of a short reference
> delimiter ("aa") to a general entity reference to entity "aa", and the
> letter "a" and then the Ee signal would be parsed, as read from the
> entity manager.  Parsing then sees the following "a", and the Ee
> intervenes so no recursive mapping can take place.

Ok.  but, what happens in the following case:

	<!ENTITY aaa "aa">
	<!ENTITY aa "a">
	<!SHORTREF map "aaa" aaa>
	<!SHORTREF map "aa" aa>
and
	aaa
???

Does this become
	aa
or
	a
???

I think that I found a clause in the standard that outlaws recursive
applications of short reference maps in any case.  Section 9.4.6.1 (page
354 of the Handbook) says (in part):

	" A short reference can be removed from a document by replacing
	 it with an equivalent reference string that contains a named entity
	 reference.  The entity name must be that to which the short
	 reference is mapped in the current map."

This says clearly to me that given the above
	aaa
is equivalent to
	&aaa;Ee
which will (eventually) become
	aa
and not 
	a

>. . .

> Hope this helps.

Absolutely.

> </Erik>

JR
Technical Details
Message-ID: <464@salt.bellcore.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!spool.mu.edu!uunet!bellcore!salt!jxr

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!spool.mu.edu!uunet!bellcore!salt!jxr
From: jxr@thumper.bellcore.com (Jonathan Rosenberg)
Newsgroups: comp.text.sgml
Subject: Re: Short Ref's Reparsed?
Message-ID: <464@salt.bellcore.com>
Date: 19 Jun 91 20:01:30 GMT
Sender: news@salt.bellcore.com
Lines: 76