W3C home > Mailing lists > Public > www-html@w3.org > December 2007

Re: Local entities in XHTML

From: David Håsäther <hasather@gmail.com>
Date: Sat, 8 Dec 2007 20:27:08 +0100
Message-ID: <1a296f990712081127h6728f604vfc57d5f2bcac2928@mail.gmail.com>
To: "Yves MARCOUX" <Yves.MARCOUX@umontreal.ca>
Cc: www-html@w3.org

Yves MARCOUX wrote:

> Is it valid to include a local declaration subset in the DOCTYPE
> declaration of a XHTML document (e.g., for declaring an entity)? For example:
>
> <?xml version="1.0" encoding="iso-8859-1"?>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
>    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
> [
> <!ENTITY ti "Nice title!">
> ]
>  >
> <html xmlns="http://www.w3.org/1999/xhtml">
> <head>
>          <title>&ti;</title>
> </head>
> ....
>
> The online W3C validator understands and accepts it, but no browser
> interprets it correctly.

Yes, it is valid. If browsers don't interpret it correctly doesn't
change this fact.
However, the above actually works in most major browers (IE does not
support it), provided that you send it with the right media type, e.g.
application/xhtml+xml.

-- 
David Håsäther
Received on Saturday, 8 December 2007 19:27:16 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:16:13 GMT