{"action":"created","issue":{"url":"https://api.github.com/repos/rdfa/rdfa-website/issues/50","labels_url":"https://api.github.com/repos/rdfa/rdfa-website/issues/50/labels{/name}","comments_url":"https://api.github.com/repos/rdfa/rdfa-website/issues/50/comments","events_url":"https://api.github.com/repos/rdfa/rdfa-website/issues/50/events","html_url":"https://github.com/rdfa/rdfa-website/issues/50","id":117542553,"number":50,"title":"empty tags incorrectly handled as opening tags","user":{"login":"richard-verhoeven","id":15904736,"avatar_url":"https://avatars.githubusercontent.com/u/15904736?v=3","gravatar_id":"","url":"https://api.github.com/users/richard-verhoeven","html_url":"https://github.com/richard-verhoeven","followers_url":"https://api.github.com/users/richard-verhoeven/followers","following_url":"https://api.github.com/users/richard-verhoeven/following{/other_user}","gists_url":"https://api.github.com/users/richard-verhoeven/gists{/gist_id}","starred_url":"https://api.github.com/users/richard-verhoeven/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/richard-verhoeven/subscriptions","organizations_url":"https://api.github.com/users/richard-verhoeven/orgs","repos_url":"https://api.github.com/users/richard-verhoeven/repos","events_url":"https://api.github.com/users/richard-verhoeven/events{/privacy}","received_events_url":"https://api.github.com/users/richard-verhoeven/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-11-18T09:03:59Z","updated_at":"2015-11-18T16:40:14Z","closed_at":null,"body":"The following HTML code:\r\n\r\n``` html\r\n<body vocab=\"http://schema.org/\">\r\n<div typeof=\"EventVenue\">\r\n    <span property=\"address\" typeof=\"PostalAddress\">\r\n          <span property=\"addressCountry\" content=\"DE\"></span>\r\n\t</span>\r\n\t<span property=\"geo\" typeof=\"GeoCoordinates\">\r\n\t  <span property=\"latitude\" content=\"50.944525\"/>\r\n\t  <span property=\"longitude\" content=\"6.951725\"/>\r\n\t</span>\r\n  </div>\r\n</body>\r\n```\r\n\r\nis interpreted correctly, i.e. `geo` and `address` are both properties of `EventVenue`. With the following equivalent code instead:\r\n\r\n``` html\r\n<body vocab=\"http://schema.org/\">\r\n<div typeof=\"EventVenue\">\r\n    <span property=\"address\" typeof=\"PostalAddress\">\r\n          <span property=\"addressCountry\" content=\"DE\"/>\r\n\t</span>\r\n\t<span property=\"geo\" typeof=\"GeoCoordinates\">\r\n\t  <span property=\"latitude\" content=\"50.944525\"/>\r\n\t  <span property=\"longitude\" content=\"6.951725\"/>\r\n\t</span>\r\n  </div>\r\n</body>\r\n```\r\n\r\nthe `geo` property is interpreted as a property of `PostalAddress`, which is wrong. It would appear that the parser works by counting closing html tags without recognizing that empty ones do not need closing ones."},"comment":{"url":"https://api.github.com/repos/rdfa/rdfa-website/issues/comments/157771592","html_url":"https://github.com/rdfa/rdfa-website/issues/50#issuecomment-157771592","issue_url":"https://api.github.com/repos/rdfa/rdfa-website/issues/50","id":157771592,"user":{"login":"niklasl","id":29803,"avatar_url":"https://avatars.githubusercontent.com/u/29803?v=3","gravatar_id":"","url":"https://api.github.com/users/niklasl","html_url":"https://github.com/niklasl","followers_url":"https://api.github.com/users/niklasl/followers","following_url":"https://api.github.com/users/niklasl/following{/other_user}","gists_url":"https://api.github.com/users/niklasl/gists{/gist_id}","starred_url":"https://api.github.com/users/niklasl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/niklasl/subscriptions","organizations_url":"https://api.github.com/users/niklasl/orgs","repos_url":"https://api.github.com/users/niklasl/repos","events_url":"https://api.github.com/users/niklasl/events{/privacy}","received_events_url":"https://api.github.com/users/niklasl/received_events","type":"User","site_admin":false},"created_at":"2015-11-18T16:40:13Z","updated_at":"2015-11-18T16:40:13Z","body":"I'm afraid it does. The playground is for trying out HTML5 (and SVG), and not strict XML. The parser is the HTML parser of the web browser, following the rules of parsing [HTML(5)](http://www.w3.org/TR/html-markup/syntax.html). That acknowledges the self-closing (XML-)notation on elements defined as void (but as such they don't even need closing). If this behaviour isn't according to [spec](http://www.w3.org/TR/html5/syntax.html#acknowledge-self-closing-flag) for `span` (which I doubt), the bug needs to be reported to Chrome, Firefox and wherever else this happens.\r\n\r\nTo visualize how the browser nests the resulting elements, add some style to the `span` along with some text (presumably) outside of that, like:\r\n\r\n```html\r\n    <span style=\"text-decoration: underline\" property=\"address\" typeof=\"PostalAddress\">\r\n      a<span property=\"addressCountry\" content=\"DE\"/> b\r\n    </span>c\r\n    <span property=\"geo\" typeof=\"GeoCoordinates\">d\r\n```\r\nNotice how every letter is underlined.\r\n\r\nThe recommended way of embedding \"hidden\" data is to use `meta` with `@property` ([whose presence qualifies it as a flow element](http://www.w3.org/TR/html-rdfa/#extensions-to-the-html5-syntax)), like:\r\n\r\n```html\r\n    <meta property=\"addressCountry\" content=\"DE\"/>\r\n````\r\nThat is a void element, and as such the self-closing slash is optional (basically for show)."}}