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

Re: Empty span/div tags in RDFa pages

From: Stephane Corlosquet <scorlosquet@gmail.com>
Date: Thu, 29 Oct 2009 00:40:12 -0400
Message-ID: <1452bf810910282140j5ba1ffa0gce09b8c641011ec2@mail.gmail.com>
To: Julian Reschke <julian.reschke@gmx.de>
Cc: Toby Inkster <tai@g5n.co.uk>, RDFa mailing list <public-rdf-in-xhtml-tf@w3.org>
Thanks! That makes sense. Firebug was right, if the same page is served as
application/xhtml+xml  it's rendered well. So now I wonder what's the best
thing to do. Keep the old text/html and not use the shorthand notation, or
switch to Content-Type: application/xhtml+xml . I think we're too late in
the development process of Drupal 7 to change the Content-Type, as I'm not
sure what the side effects are.

Steph.

On Mon, Oct 26, 2009 at 1:40 PM, Julian Reschke <julian.reschke@gmx.de>wrote:

> 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 Thursday, 29 October 2009 04:41:50 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 29 October 2009 04:41:51 GMT