-
Notifications
You must be signed in to change notification settings - Fork 19
Update RDFa algorithm to reflect Ruby Microdata to RDF implementation. #84
Conversation
Tell me how to make an IPR commitment, and presumably this will clear the check. |
The best way would be to join the WG as it will cover future contributions. |
Done. I’m now in the WG. |
There was a problem hiding this 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>. |
There was a problem hiding this comment.
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> |
There was a problem hiding this comment.
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.
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.