W3C home > Mailing lists > Public > spec-prod@w3.org > October to December 2004

Improper XHTML syntax when using text/html

From: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Thu, 02 Dec 2004 14:31:46 +0100
To: spec-prod@w3.org
Message-ID: <41ba13bd.259284953@smtp.bjoern.hoehrmann.de>

Dear Editors,

  An unfortunate side-effect of using XML tools to generate Technical
Reports in the XHTML format is that most tools are not suited for this
task when it is desired that the document is delivered using the text/
html MIME Type, it is for example common that empty a elements like

  <a name="foo" id="bar"></a>

are generated using the empty-element syntax, i.e.

  <a name="foo" id="bar" />

which is not well-supported among text/html processors, it is for
example common that 

  <a name="foo" id="bar" /><span>...</span>

is considered to be

  <a name="foo" id="bar"><span>...</span></a>

which might not affect the visual representation of the document but
causes problems for a11y tools that attempt to post-process the DOM
generated for the document. This is one of the reasons why the XHTML
Recommendation advises against using such syntax. Recent documents
that are affected by such problems would be


Ways around these problems would be to use HTML instead of XHTML,
special XHTML output modi (for example, XSLT 2.0 is going to offer
<xsl:output method="xhtml" /> which might already work to the extend
necessary in experimental implementations) or using HTML Tidy on the
document. HTML Tidy is available via


and online services are available e.g. at 


To check whether the relevant requirements are met, an experimental
tool is also available at


Example output would be


A future version of this tool might be integrated into the Markup
Validator but this is likely going to take some time. Please make sure
your documents are not subject to such errors before publication.

Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 
Received on Thursday, 2 December 2004 13:32:10 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:55:12 UTC