- From: David Håsäther <hasather@gmail.com>
- Date: Sat, 8 Dec 2007 20:27:08 +0100
- 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 UTC