Closed chaals closed 7 years ago
+1
Hmmm. Dealing with itemref
seems to throw up an issue. As I understand it the example in the spec (gotta fix #71)
<div id="x">
<p itemprop="a">1</p>
</div>
<div itemscope itemref="x">
<p itemprop="b">test</p>
<p itemprop="a">2</p>
</div>
Should produce the same output as
<div vocab="http://example.com/">
<div resource="#x" typeof="rdfa:Pattern" id="x">
<p property="a">1</p>
</div></div>
<div vocab="http://example.com/" typeof="thing">
<link rel="rdfa:copy" href="#x">
<p property="b">test</p>
<p property="a">2</p>
</div>
plus an extra node with the rdfa:Pattern.
It does for the structured data linter, and Yandex' SDV, but not in Google's validator.
@danbri, @iherman?
@chaals, FWIW, my code does exactly what you describe.
My understanding is that the Google parsers should currently handle Microdata's itemref, but not RDFa 1.1's rdfa:Pattern property-copying. Is that consistent with what you're seeing?
For e.g. serious internationalisation microdata has some pretty fundamental issues - see e.g. #21, #22. It is possible to work around most of these by converting to another format. Since most tools seem to work with both, instead of trying to rewrite microdata which would make it more complex, I think we should just suggest that people use RDFa or JSON-LD if they need their capabilities.
See also #3, #29