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

Re: Empty span/div tags in RDFa pages

From: Toby Inkster <tai@g5n.co.uk>
Date: Fri, 23 Oct 2009 19:43:13 +0100
To: Stephane Corlosquet <scorlosquet@gmail.com>
Cc: RDFa mailing list <public-rdf-in-xhtml-tf@w3.org>
Message-Id: <1256323393.7123.325.camel@ophelia2.g5n.co.uk>
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.

-- 
Toby A Inkster
<mailto:mail@tobyinkster.co.uk>
<http://tobyinkster.co.uk>
Received on Friday, 23 October 2009 18:43:54 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 23 October 2009 18:43:55 GMT