{"action":"created","issue":{"url":"https://api.github.com/repos/schemaorg/schemaorg/issues/1540","repository_url":"https://api.github.com/repos/schemaorg/schemaorg","labels_url":"https://api.github.com/repos/schemaorg/schemaorg/issues/1540/labels{/name}","comments_url":"https://api.github.com/repos/schemaorg/schemaorg/issues/1540/comments","events_url":"https://api.github.com/repos/schemaorg/schemaorg/issues/1540/events","html_url":"https://github.com/schemaorg/schemaorg/issues/1540","id":211534423,"number":1540,"title":"Can we find legal HTML5 Microdata example with complex structure in HTML head?","user":{"login":"danbri","id":170265,"avatar_url":"https://avatars3.githubusercontent.com/u/170265?v=3","gravatar_id":"","url":"https://api.github.com/users/danbri","html_url":"https://github.com/danbri","followers_url":"https://api.github.com/users/danbri/followers","following_url":"https://api.github.com/users/danbri/following{/other_user}","gists_url":"https://api.github.com/users/danbri/gists{/gist_id}","starred_url":"https://api.github.com/users/danbri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danbri/subscriptions","organizations_url":"https://api.github.com/users/danbri/orgs","repos_url":"https://api.github.com/users/danbri/repos","events_url":"https://api.github.com/users/danbri/events{/privacy}","received_events_url":"https://api.github.com/users/danbri/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"danbri","id":170265,"avatar_url":"https://avatars3.githubusercontent.com/u/170265?v=3","gravatar_id":"","url":"https://api.github.com/users/danbri","html_url":"https://github.com/danbri","followers_url":"https://api.github.com/users/danbri/followers","following_url":"https://api.github.com/users/danbri/following{/other_user}","gists_url":"https://api.github.com/users/danbri/gists{/gist_id}","starred_url":"https://api.github.com/users/danbri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danbri/subscriptions","organizations_url":"https://api.github.com/users/danbri/orgs","repos_url":"https://api.github.com/users/danbri/repos","events_url":"https://api.github.com/users/danbri/events{/privacy}","received_events_url":"https://api.github.com/users/danbri/received_events","type":"User","site_admin":false},"assignees":[{"login":"danbri","id":170265,"avatar_url":"https://avatars3.githubusercontent.com/u/170265?v=3","gravatar_id":"","url":"https://api.github.com/users/danbri","html_url":"https://github.com/danbri","followers_url":"https://api.github.com/users/danbri/followers","following_url":"https://api.github.com/users/danbri/following{/other_user}","gists_url":"https://api.github.com/users/danbri/gists{/gist_id}","starred_url":"https://api.github.com/users/danbri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danbri/subscriptions","organizations_url":"https://api.github.com/users/danbri/orgs","repos_url":"https://api.github.com/users/danbri/repos","events_url":"https://api.github.com/users/danbri/events{/privacy}","received_events_url":"https://api.github.com/users/danbri/received_events","type":"User","site_admin":false}],"milestone":null,"comments":4,"created_at":"2017-03-02T22:12:22Z","updated_at":"2017-03-03T00:12:26Z","closed_at":null,"body":"/cc @unor @chaals @gkellogg who may have insight\r\n\r\nsee also https://www.w3.org/Bugs/Public/show_bug.cgi?id=15304  /cc @kansandhaus \r\n\r\nIt is pretty problematic putting complex structures in HTML head section. In theory Microdata itemref is a workaround for this, but I haven't found a pattern that W3C or Nu validators accept.\r\n\r\ne.g. https://validator.nu/?doc=https%3A%2F%2Fgist.githubusercontent.com%2Fdanbri%2F3434a7684aff67b1eb975c111151755c%2Fraw%2F792442c39d84d5cc788bf92056fc4fad0a5adb30%2Fgistfile1.txt&charset=UTF-8&parser=html5&laxtype=yes\r\n\r\nThis is what I was trying:\r\n\r\n```<!DOCTYPE html>\r\n<html>\r\n <head>\r\n  <title>Example showing complex structures in HTML head</title>\r\n   <meta itemprop=\"speakable\" itemscope itemtype=\"http://schema.org/SpeakableSpecification\" itemref=\"m1 m2\">\r\n   <meta id=\"m1\" itemprop=\"cssSelector\" content=\".title\">\r\n   <meta id=\"m2\" itemprop=\"xpath\" content=\"/html/body/etc/etc\">\r\n  </head>\r\n <body>\r\n  <h1 class=\"title\">Complex Microdata in HTML head</h1>\r\n  <p>...</p>\r\n</html>```"},"comment":{"url":"https://api.github.com/repos/schemaorg/schemaorg/issues/comments/283824574","html_url":"https://github.com/schemaorg/schemaorg/issues/1540#issuecomment-283824574","issue_url":"https://api.github.com/repos/schemaorg/schemaorg/issues/1540","id":283824574,"user":{"login":"gkellogg","id":46296,"avatar_url":"https://avatars3.githubusercontent.com/u/46296?v=3","gravatar_id":"","url":"https://api.github.com/users/gkellogg","html_url":"https://github.com/gkellogg","followers_url":"https://api.github.com/users/gkellogg/followers","following_url":"https://api.github.com/users/gkellogg/following{/other_user}","gists_url":"https://api.github.com/users/gkellogg/gists{/gist_id}","starred_url":"https://api.github.com/users/gkellogg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gkellogg/subscriptions","organizations_url":"https://api.github.com/users/gkellogg/orgs","repos_url":"https://api.github.com/users/gkellogg/repos","events_url":"https://api.github.com/users/gkellogg/events{/privacy}","received_events_url":"https://api.github.com/users/gkellogg/received_events","type":"User","site_admin":false},"created_at":"2017-03-03T00:12:26Z","updated_at":"2017-03-03T00:12:26Z","body":"Looking at the following:\r\n\r\n```html\r\n<html>\r\n <head>\r\n  <title>Example showing complex structures in HTML head</title>\r\n   <meta itemprop=\"speakable\" itemscope itemtype=\"http://schema.org/SpeakableSpecification\" itemref=\"m1 m2\">\r\n   <meta id=\"m1\" itemprop=\"cssSelector\" content=\".title\">\r\n   <meta id=\"m2\" itemprop=\"xpath\" content=\"/html/body/etc/etc\">\r\n  </head>\r\n <body>\r\n  <h1 class=\"title\">Complex Microdata in HTML head</h1>\r\n  <p>...</p>\r\n</html>\r\n```\r\nThe reason it is invalid is that all three `meta` lines do not reside within a top-level item. For the first entry, `@itemscope` is set, but also `@itemprop`, which would relate to a previous top-level item, which can't exist in the `head` section.\r\n\r\nFrom the [Microdata to RDF](https://www.w3.org/TR/microdata-rdf/#dfn-top-level-item) spec, a `top-level-item` is one which does not contain an `@itemprop` attribute, but contains `@itemscope`.\r\n\r\n\r\n@jvandriel's examples work because they establish a top-level item."}}
{"actor":{"display_login":"gkellogg"}}