- From: Jeni Tennison <jeni@jenitennison.com>
- Date: Wed, 21 Dec 2011 20:57:42 +0000
- To: "Sandhaus, Evan" <sandhes@nytimes.com>
- Cc: public-vocabs <public-vocabs@w3.org>
Evan, Why not use <meta> and <link> elements in the <body>, within <div>s that provide you with whatever structure you need? Why do you want to put the <link> and <meta> elements within <head>? BTW, I think that this is the same as bug 14112 [1] which Hixie closed for lack of information. If you have a good use case then it might be worth reopening that bug or raising a new one. Cheers, Jeni [1] https://www.w3.org/Bugs/Public/show_bug.cgi?id=14112 On 21 Dec 2011, at 20:06, Sandhaus, Evan wrote: > I am currently advising a number of teams on the implementation of Schema.org markup and I've encountered an issue with nested metadata in the <HEAD> element. > > Suppose you have a 'NewsArticle' document to which you have added an 'itemscope' to the <HTML> element. Lets further suppose that you want to add some non-visible metadata to the <head> element, say the word count. To do this you'd code up something like: > > <html itemscope itemtype='http://schema.org/NewsArticle"> > <head> > <meta itemprop="wordCount" content="1138"/> > ... > > So far so good, but now suppose we want to add another bit of non-visible metadata to the <head>, but this time we want to add a 'Person' object. > > This is where the problem comes in. Inserting a 'Person' object requires that we nest tags and it isn't legal in HTML to nest <meta> tags. Only a few tags are legal in the scope of <HEAD>. These tags are <TITLE>, <BASE>, <LINK>, <META>, and <STYLE>. The problem with this is that none of these tags are permitted to have child tags and you can't express that a 'http://schema.org/NewsItem' object is 'about' a 'http://schema.org/Person' without nesting tags. In HTML 4 but not HTML 5 the <OBJECT> element is legal in the <HEAD>. > > So what can I do? Is there any valid HTML 5 way to express the following (where nestable is the hypothetical name of an element that doesn't make this illegal )? > > > <html itemscope itemtype='http://schema.org/NewsArticle"> > <head> > <meta itemprop="wordCount" content="1138"/> > <nestable itemscope itemtype="http://schema.org/Person"> > <meta itemprop="name" content="Evan Sandhaus"/> > </nestable> > .... > </head> > ... > </html> > > If it is not possible to do this, how would you suggest I proceed? > > Thanks! > > ~Evan -- Jeni Tennison http://www.jenitennison.com
Received on Wednesday, 21 December 2011 20:58:09 UTC