RE: HTML Specification: Interpretation of Ampersands

Alex Lange (lange@trusty.lmsc.lockheed.com)
Tue, 12 Jul 1994 12:02:24 -0700 (PDT)


>> Is there some special case in force here? How should a string like this be
>> handled?
>>
>> What should the rule for interpretation be where the ampersand is not followed
>> by either a character reference or one of the special entities specified in th
>e
>> DTD?
>
[some lines deleted]
>
> <a href=someURL>Some Text &</a>
>
>will display
>
> Some Text &</a>
>
>It will work with a space in between the '&' and '</a>'.
>
>Garrett.
>

I have found it best to always use the complete specification
of an SGML general entity reference, including the "reference end",
like this:

&amp;
^--note the terminating semi-colon.

This avoids any ambiguity the parser cannot resolve.

I have noted that some programs to convert some markup
to HTML neglect to add the reference end, which means some clean
up in the converted file.

Alex Lange E-mail: lange@lmsc.lockheed.com
Senior Publications Specialist Phone: (408) 756-9757
User Computing Services-MSD/HR/FIN/OPS/Other FAX: (408) 742-2563
O/52-43 B/102, Information Resources Division
Lockheed Missiles & Space Company, Inc.
1111 Lockheed Way, Sunnyvale CA 94089