This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 12809 - Invalid examples using link and meta elements in the body
Summary: Invalid examples using link and meta elements in the body
Status: RESOLVED FIXED
Alias: None
Product: HTML WG
Classification: Unclassified
Component: LC1 HTML Microdata (editor: Ian Hickson) (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Ian 'Hixie' Hickson
QA Contact: HTML WG Bugzilla archive list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-29 10:50 UTC by pmika
Modified: 2011-08-04 05:05 UTC (History)
5 users (show)

See Also:


Attachments

Description pmika 2011-05-29 10:50:33 UTC
According to the HMTL5 LC document [1], the link and meta tags may not appear in the body, and further require a rel attribute (for link) and one of name, http-equiv, and charset (for meta). 

There are several examples in the HTML Microdata document where this is violated, e.g. 

<span itemscope><meta itemprop="name" content="The Castle"></span>

in Section 2.2 shows a meta element in the body which does not have name, http-equiv, or charset.

and further below in Section 5.2.1 appears a link element in the body and without a rel:

 <link itemprop="http://purl.org/dc/terms/type" href="http://books.example.com/product-types/BOOK">

There are possibly other places where the document needs to be revised, since these mistakes seem to be consistent and possibly reflecting an earlier version of the HTML5 draft where this was allowed.

[1] http://www.w3.org/TR/2011/WD-html5-20110525/
Comment 1 Aryeh Gregor 2011-05-29 14:24:22 UTC
This looks like an oversight in the spec splitting.  The intent is that meta/link should be valid in this case, as in the WHATWG version:

http://www.whatwg.org/specs/web-apps/current-work/multipage/semantics.html#the-link-element
http://www.whatwg.org/specs/web-apps/current-work/multipage/semantics.html#the-meta-element

But of course these lines aren't present in the W3C draft of HTML5.  So the W3C version of microdata has to include some text saying that it makes meta and link valid in the body if the itemprop attribute is present.
Comment 2 pmika 2011-05-29 15:23:30 UTC
Hi Aryeh,

Possibly, but if you contend that this is a bug in the HTML5 spec, then you need to open a bug to the HTML5 spec.

Cheers,
Peter
Comment 3 Michael[tm] Smith 2011-05-29 16:09:31 UTC
(In reply to comment #2) from Peter
> Possibly, but if you contend that this is a bug in the HTML5 spec, then you
> need to open a bug to the HTML5 spec.

There is a part of the "Extensibility" section of the HTML5 spec that contains some language indicating that other "applicable specifications" can override conformance criteria given in the HTML5 spec.

  http://dev.w3.org/html5/spec/infrastructure.html#other-applicable-specifications

Relevant excerpt:

[[
The conformance terminology for documents depends on the nature of the changes introduced by such applicable specificactions, and on the content and intended interpretation of the document. Applicable specifications MAY define new document content (e.g. a foobar element), MAY prohibit certain otherwise conforming content (e.g. prohibit use of <table>s), or MAY change the semantics, DOM mappings, or other processing rules for content defined in this specification. 
]]

So in this case, the Microdata spec is a such an applicable specification.

All that said, a document that contains Microdata markup such itemscope is not actually a conforming HTML5 document (not as far as the W3C HTML5 defines it). It is instead considered a conforming HTML5+Microdata document.
Comment 4 Aryeh Gregor 2011-05-29 19:16:57 UTC
As Mike says, it's not a bug in HTML5.  The microdata spec overrules certain requirements in the HTML5 spec, e.g., permitting certain attributes that HTML5 does not permit.  Likewise, it needs to permit <meta> and <link> to be used in certain cases where HTML5 doesn't permit them.
Comment 5 Ian 'Hixie' Hickson 2011-05-31 20:16:33 UTC
This isn't unintentional. I commented out the dependencies from Microdata to HTML at some point to address some pointless bureaucratic request, and this was one of the necessary victims.

The WHATWG spec has the microdata stuff where it belongs, in the same spec as the rest of HTML, and this stuff is clearly defined there.
Comment 6 Ian 'Hixie' Hickson 2011-05-31 23:31:59 UTC
EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:
   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Accepted
Change Description: I put the dependency back in to resolve this.
Rationale: This (and a number of other things) have to be defined for microdata to make sense.
Comment 7 contributor 2011-05-31 23:35:50 UTC
Checked in as WHATWG revision r6165.
Check-in comment: allow dependency on HTML again
http://html5.org/tools/web-apps-tracker?from=6164&to=6165
Comment 8 pmika 2011-06-01 09:52:05 UTC
Hi Ian,

Could you please clarify what is the dependency that you mean?

Based on what Aryeh and Mike said I would have expected some additional text in the HTML Microdata document that spells out explicitly that <link> and <meta> are allowed in HTML5+Microdata... otherwise the reader of the spec learns only from an example that this is the case... but then he/she might also wonder what else is allowed in HTML5+Microdata that is not allowed in HTML5. For one, I don't know the answer... is it just <link> and <meta>?

Therefore I still consider this a (documentation) bug.

Thanks,
Peter
Comment 9 Simon Pieters 2011-06-01 10:05:39 UTC
See http://dev.w3.org/html5/md/#content-models
Comment 10 pmika 2011-06-01 10:13:34 UTC
Perfect, thanks! Closing.
Comment 11 Michael[tm] Smith 2011-08-04 05:05:36 UTC
mass-move component to LC1