- From: Jeni Tennison <jeni@jenitennison.com>
- Date: Tue, 15 Nov 2011 08:52:14 +0000
- To: Ivan Herman <ivan@w3.org>
- Cc: HTML Data Task Force WG <public-html-data-tf@w3.org>
Ivan, On 15 Nov 2011, at 08:03, Ivan Herman wrote: > On Nov 14, 2011, at 20:29 , Jeni Tennison wrote: >> I've written some text warning people about potential restructuring of invalid HTML [1] which I've reproduced below. >> >> I haven't mentioned the issue around omitted tags for <head> and <body>, which having thought about it I think is a HTML+RDFa bug. It is, after all, HTML+RDFa which introduces the rules that rely on the presence of head/body [2]: >> >> * In Section 7.5: Sequence, processing step 6, if no URI is provided by a resource attribute, then first check to see if the element is the head or body element. If it is, then act as if there is an empty @about present, and process it according to the rule for @about. >> * In Section 7.5: Sequence, processing step 7, if no URI is provided, then first check to see if the element is the head or body element. If it is, then act as if there is an empty @about present, and process it according to the rule for @about. >> >> I think the solution is probably to add a rule that RDFa attributes such as @about aren't permitted on the <html> element. > > Why? I am not sure I understand this... The following document is valid HTML5+RDFa: <!DOCTYPE html> <html about="#me" typeof="schema:Person"> <title>Home Page</title> <p property="schema:name">Jeni Tennison</p> </html> It has omitted the tags for <head> and <body>, but they are omittable in HTML5. To a person reading the document, it looks as though it says: <#me> a schema:Person ; schema:name "Jeni Tennison" ; . (This is also what it says to an XML-based processor.) However, the HTML DOM is actually: <!DOCTYPE html> <html about="#me" typeof="schema:Person"> <head> <title>Home Page</title> </head> <body> <p property="schema:name">Jeni Tennison</p> </body> </html> Therefore, to an HTML-aware RDFa processor, the rules I quoted above apply; it acts as though there's an empty @about on the <body> element, and you get: <> schema:name "Jeni Tennison" . If it weren't valid to put the attributes on the <html> element in the first place, you wouldn't get the confusion. Cheers, Jeni -- Jeni Tennison http://www.jenitennison.com
Received on Tuesday, 15 November 2011 08:52:46 UTC