- From: Ian B. Jacobs <ij@w3.org>
- Date: Mon, 02 Aug 2004 17:21:34 -0500
- To: Nick Kew <nick@webthing.com>
- Cc: www-validator@w3.org
- Message-Id: <1091485294.6407.236.camel@seabright>
On Mon, 2004-08-02 at 17:11, Nick Kew wrote: > On Mon, 2 Aug 2004, Ian B. Jacobs wrote: > > > Hi Validator Team, > > > > Could you help with this question about whether > > <a name="foo"/> is valid xhtml 1.0 (I think it isn't) or, if > > not, why the validator doesn't complain? > > It's perfectly valid. Nothing in XHTML precludes <a> being empty, > and XML rules require equivalence of <a/> and <a></a>. Ah, I didn't know that bit of XML. > The only thing > it violates is the non-normative and problematic Appendix C. Specifically [1]: C.3. Element Minimization and Empty Element Content Given an empty instance of an element whose content model is not EMPTY (for example, an empty title or paragraph) do not use the minimized form (e.g. use <p> </p> and not <p />). [1] http://www.w3.org/TR/2002/REC-xhtml1-20020801/#guidelines > > > This page was sent as text/html but uses tags of the form <a name="foo" > > > /> which does not actually close the <a> tag in conforming HTML4 > > > user-agents (I'm using safari 1.2.2). > > Indeed, this is why HTML4 is better-suited to the web today than XHTML. > > Alternatively, if tou have valid but non-Appendix-C-conforming XHTML, > you can use mod_xhtml to ensure that it is Appendix-C-compliant when > it is served. What about serving it as something other than text/html? Per [2], it seems like application/xhtml+xml is appropriate. _ Ian [2] http://www.w3.org/TR/2002/NOTE-xhtml-media-types-20020801/xhtml-media-types.html#summary -- Ian Jacobs (ij@w3.org) http://www.w3.org/People/Jacobs Tel: +1 718 260-9447
Received on Monday, 2 August 2004 18:21:51 UTC