- From: Sandhaus, Evan <sandhes@nytimes.com>
- Date: Wed, 21 Dec 2011 15:06:24 -0500
- To: public-vocabs <public-vocabs@w3.org>
- Message-ID: <3E22C912-9B58-4825-A552-CA526B5C3E7C@nytimes.com>
I am currently advising a number of teams on the implementation of Schema.org<http://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
Received on Wednesday, 21 December 2011 20:06:54 UTC