emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why is ' commented out in mm-url-html-entities?


From: Deniz Dogan
Subject: Re: Why is ' commented out in mm-url-html-entities?
Date: Wed, 3 Nov 2010 19:21:09 +0100

2010/11/3 Lennart Borgman <address@hidden>:
> It seems it is used quite often, at least on web pages.
>
>

&apos; is special.

The following is quoted from current version of:
http://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references#Entities_representing_special_characters_in_XHTML

----8<----

The XHTML  DTDs explicitly declare 253 entities (including the 5
predefined entities of XML 1.0) whose expansion is a single character,
which can therefore be informally referred to as "character entities".
These (with the exception of the &apos; entity) have the same names
and represent the same characters as the 252 character entities in
HTML. Also, by virtue of being XML, XHTML documents may reference the
predefined &apos; entity, which is not one of the 252 character
entities in HTML. Additional entities of any size may be defined on a
per-document basis. However, the usability of entity references in
XHTML is affected by how the document is being processed:

    * If the document is read by a conforming HTML processor, then
only the 252 HTML character entities can safely be used. The use of
&apos; or custom entity references may not be supported and may
produce unpredictable results.
    * If the document is read by an XML parser that does not or cannot
read external entities, then only the five built-in XML character
entities (see above) can safely be used, although other entities may
be used if they are declared in the internal DTD subset.
    * If the document is read by an XML parser that does read external
entities, then the five built-in XML character entities can safely be
used. The other 248 HTML character entities can be used as long as the
XHTML DTD is accessible to the parser at the time the document is
read. Other entities may also be used if they are declared in the
internal DTD subset.

Because of the special &apos; case mentioned above, only &quot;,
&amp;, &lt;, and &gt; will work in all processing situations.

----8<----

That said, I guess the reason for leaving it out of the alist is that
its value would be ambiguous.

-- 
Deniz Dogan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]