Click here to get back home

Entity References

 HomeNewsGroups | Search | About
 comp.infosystems.www.authoring.html    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Entity References David E. Ross 10-11-2007
---> Re: Entity References Jukka K. Korpel...10-12-2007
  ---> Re: Entity References Jukka K. Korpel...10-13-2007
      ---> Re: Entity References Jukka K. Korpel...10-14-2007
Posted by David E. Ross on October 11, 2007, 11:48 pm
Please log in for more thread options
W3C's HTML 4.01 Specification indicates in Section 5.3 that the
semi-colon at the end of an entity reference may be omitted in certain
situations. The situations seem to be those in which an implied
semi-colon can be readily inferred from the context (e.g., before a
line-break or HTML tag). However, the Specification strongly recommends
always using the semi-colon.

Recently, I accidentally omitted a semi-colon at the end of &mdash that
had blank characters before and after the entity reference. SeaMonkey
displayed the page with an M-dash character in that location, which
prevented me from detecting the omitted semi-colon during proof-reading.
The W3C HTML validator did not note any improper use of the ampersand,
which I interpret as meaning the entity reference was recognized as
valid without the semi-colon.

However, a friend using Internet Explorer sent me an E-mail asking what
&mdash is. Thus, another IE failure to comply with the HTML 4.01
Specification is demonstrated, as is the importance of the strong
recommendation in the Specification.

--
David E. Ross
<http://www.rossde.com/>

Natural foods can be harmful: Look at all the
people who die of natural causes.

Posted by Darin McGrew on October 12, 2007, 1:17 am
Please log in for more thread options
> W3C's HTML 4.01 Specification indicates in Section 5.3 that the
> semi-colon at the end of an entity reference may be omitted in certain
> situations. The situations seem to be those in which an implied
> semi-colon can be readily inferred from the context (e.g., before a
> line-break or HTML tag). However, the Specification strongly recommends
> always using the semi-colon.
>
> Recently, I accidentally omitted a semi-colon at the end of &mdash that
> had blank characters before and after the entity reference. SeaMonkey
> displayed the page with an M-dash character in that location, which
> prevented me from detecting the omitted semi-colon during proof-reading.
> The W3C HTML validator did not note any improper use of the ampersand,
> which I interpret as meaning the entity reference was recognized as
> valid without the semi-colon.
>
> However, a friend using Internet Explorer sent me an E-mail asking what
> &mdash is. Thus, another IE failure to comply with the HTML 4.01
> Specification is demonstrated, as is the importance of the strong
> recommendation in the Specification.

Yep. And including all the optional closing tags (e.g., </p>, </li>, </td>)
helps MSIE come closer to getting the CSS right.

If only all MSIE workarounds could be automated as easily as these.
--
Darin McGrew, mcgrew@stanfordalumni.org, http://www.rahul.net/mcgrew/
Web Design Group, darin@htmlhelp.com, http://www.HTMLHelp.com/

"Predictions are difficult, especially about the future." - Casey Stengel

Posted by Steve Swift on October 12, 2007, 5:16 am
Please log in for more thread options
> However, a friend using Internet Explorer sent me an E-mail asking what
> &mdash is. Thus, another IE failure to comply with the HTML 4.01
> Specification is demonstrated, as is the importance of the strong
> recommendation in the Specification.

Extra ammunition: IE7 and Opera also render &mdash as &mdash

--
Steve Swift
http://www.swiftys.org.uk/swifty.html
http://www.ringers.org.uk

Posted by Jukka K. Korpela on October 12, 2007, 2:59 pm
Please log in for more thread options
Scripsit David E. Ross:

> W3C's HTML 4.01 Specification indicates in Section 5.3 that the
> semi-colon at the end of an entity reference may be omitted in certain
> situations. The situations seem to be those in which an implied
> semi-colon can be readily inferred from the context (e.g., before a
> line-break or HTML tag).

The definitive definition is implicit: the HTML 4.01 specification
normatively references the SGML standard, which specifies that the reference
close (represented as ";") may be omitted unless the reference is
immediately followed by a name character.

> However, the Specification strongly
> recommends always using the semi-colon.

Rrright.

> However, a friend using Internet Explorer sent me an E-mail asking
> what &mdash is. Thus, another IE failure to comply with the HTML 4.01
> Specification is demonstrated, as is the importance of the strong
> recommendation in the Specification.

Quite right. Actually this misbehavior of IE was introduced by IE 7, and
it's not consistent: entity references for ISO Latin 1 characters (e.g.,
&eacute;) are recognized without the semicolon - by the SGML rules - and so
are character references that use decimal notation. But other entity
references and character references using hexadecimal notation are not
recognized but taken literally. This is just madness and breaks existing
pages for no good reason.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/


Posted by Stan Brown on October 12, 2007, 5:21 pm
Please log in for more thread options
Fri, 12 Oct 2007 21:59:51 +0300 from Jukka K. Korpela
> Actually this misbehavior of IE was introduced by IE 7, ...
> other entity references and character references using hexadecimal
> notation are not recognized but taken literally.

Do you mean they are not recognized at all, or not recognized unless
they have the terminating semicolon?

I wouldn't put anything past IE.

--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2.1 spec: http://www.w3.org/TR/CSS21/
validator: http://jigsaw.w3.org/css-validator/
Why We Won't Help You:
http://diveintomark.org/archives/2003/05/05/why_we_wont_help_you

Similar ThreadsPosted
When did IE stop recognizing entity references without ";"? October 11, 2005, 10:51 am
Entity reference Difference? July 27, 2007, 3:47 pm
Browser support for internal entity definitions April 4, 2006, 5:22 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap