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

Update RDFa algorithm to reflect Ruby Microdata to RDF implementation. #84

Merged
merged 3 commits into from
Dec 13, 2017

Conversation

gkellogg
Copy link
Member

This update reflects my implementation at https://github.com/ruby-rdf/rdf-microdata/blob/develop/lib/rdf/microdata/rdfa_reader.rb. Other than some vestiges of the Microdata to RDF Registry, this passes the Microdata to RDF test suite (once rdfa:usesVocabulary triples are removed).

Relates to #83.

@gkellogg
Copy link
Member Author

Tell me how to make an IPR commitment, and presumably this will clear the check.

@ylafon
Copy link
Member

ylafon commented Nov 14, 2017

The best way would be to join the WG as it will cover future contributions.

@gkellogg
Copy link
Member Author

Done. I’m now in the WG.

Copy link
Member Author

@gkellogg gkellogg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewing my own PR, for clarity. We may want to discuss further simplifications.

<p class="note">The choice of element is left to the author, to provide sufficient flexibility
to avoid unwanted changes in the rendering of the content.</p>
<li>Replace the <a>itemscope</a> attribute with a <code>vocab</code> attribute, whose value is the <a>vocabulary identifier</a> for the item.</li>
<li>Replace any <a>itemtype</a> attribute with a <code>typeof</code> attribute whose value is taken from the values of <a>itemtype</a> where each type is made relative to <a>vocabulary identifier, ensuring that the element has a <code>typeof</code> attribute with at least an empty value.</a>.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Making these relative doesn’t really add anything, and any that are already relative will be resolved against in-scope typeof.

<li>Replace any <a>itemid</a> attribute with a
<code>resource</code> attribute having the same value.</li>
<li>Otherwise, ensure that element has a <code>typeof</code>
attribute with at least an empty value.</li>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tensuring it has typeof may not be necessary, as language elsewhere in the spec seems to require an item have an itemtype, but RDFa makes no such assumption, and it may be overkill, except for top-level items. A typeof property is necessary to create a subject node, if there is no itemid.

@chaals chaals merged commit ef6f954 into w3c:gh-pages Dec 13, 2017
@gkellogg gkellogg deleted the gkellogg-rdfa-update branch December 13, 2017 15:36
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants