Skip to content
This repository has been archived by the owner on Nov 11, 2019. It is now read-only.

Describe conversion to RDFa #52

Closed
chaals opened this issue Jun 24, 2017 · 4 comments · Fixed by #73
Closed

Describe conversion to RDFa #52

chaals opened this issue Jun 24, 2017 · 4 comments · Fixed by #73

Comments

@chaals
Copy link
Collaborator

chaals commented Jun 24, 2017

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

@iherman
Copy link
Member

iherman commented Jun 25, 2017

+1

@chaals
Copy link
Collaborator Author

chaals commented Jul 19, 2017

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 pushed a commit that referenced this issue Jul 19, 2017
fix #52

WARNING! This may not be complete or accurate.

haven't looked at whether we really need data typing for e.g.
date/times. We *seem* not to need it for URLs...
@iherman
Copy link
Member

iherman commented Jul 31, 2017

@chaals, FWIW, my code does exactly what you describe.

@danbri
Copy link
Contributor

danbri commented Jul 31, 2017

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?

@danbri danbri closed this as completed in #73 Sep 6, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants