W3C home > Mailing lists > Public > public-rdf-in-xhtml-tf@w3.org > October 2009

Re: Empty span/div tags in RDFa pages

From: Julian Reschke <julian.reschke@gmx.de>
Date: Mon, 26 Oct 2009 18:40:01 +0100
Message-ID: <4AE5DEF1.3090608@gmx.de>
To: Toby Inkster <tai@g5n.co.uk>
CC: Stephane Corlosquet <scorlosquet@gmail.com>, RDFa mailing list <public-rdf-in-xhtml-tf@w3.org>
Toby Inkster wrote:
> On Fri, 2009-10-23 at 14:12 -0400, Stephane Corlosquet wrote:
>> There are only 10 EMPTY tags in HTML 1.0, and neither div nor span is
>> part of these. I looked in XHTML 1.1 and didn't find anything. The
>> RDFa DTD [2] does not declare new EMPTY tags either. Can someone point
>> me to some specs or a DTD which explains why the empty tag notation is
>> allowed in RDFa?
> ´╗┐If you read the XHTML 1.0 spec, you'll find that <div/> is perfectly
> valid. Appendix C discourages it in favour of <div></div>, but Appendix
> C is informative, not normative.
> XHTML 1.1 was written as more of a "pure XML application" with
> backwards-compatibility with non-X HTML less in mind, so takes the
> they-parse-exactly-the-same-under-XML-rules approach. RDFa is built on
> XHTML 1.1 rather than XHTML 1.0, thus inherits the "who cares whether
> you use <div></div> or <div/>?" philosophy - in theory.
> In practice, if you're serving RDFa using the text/html Content-Type,
> you'll want to pay attention to the Appendix C guidelines of XHTML 1.0,
> and avoid writing <div/>.
> This is true for any XHTML-family language, not just RDFa - in theory
> <div/> and <div></div> are identical, but in practise, served as
> text/html, they're parsed very differently.

Which of course is caused by the fact that you simply can't serve XHTML 
as text/html. The media type is authoritative, so recipients will treat 
it as HTML.

BR, Julian
Received on Monday, 26 October 2009 17:40:41 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:50:33 UTC