semantifyit / sdo-check

Open source version of the sdo-check tool of semantify.it
11 stars 3 forks source link

Support for RDFa? #10

Open lechten opened 3 years ago

lechten commented 3 years ago

According to https://semantify.it/sdo-check/, RDFa is supported. When checking HTML with RDFa, I get this error:

The annotation has no '@context' entry, as expected.

With RDFa, I use prefix, not @context, e.g.:

<div about="https://example.org/index.html" prefix="schema: http://schema.org/">
<a rel="schema:hasPart" typeof="schema:LearningResource" href="a-part.html">A learning resource as part.</a>
</div>

Can this be validated somehow?

OmarJAH commented 3 years ago

Hello, lechten.

Are you sure that your snipped is valid? Personally, I am no expert with RDFa. I changed your snippet to the following, which works (using schema.org as the standard vocabulary).

<div vocab="http://schema.org/" about="https://example.org/index.html" typeof="LearningResource">
    <a rel="hasPart"  href="a-part.html">A learning resource as part.</a>
</div>

I guess this works for the fellas working only with schema.org. You would have to search yourself how to correctly define multiple vocabularies in RDFa if you really need it.

cheers, Omar

lechten commented 3 years ago

Hi Omar, many thanks for your quick reply.

I hope that this is valid. The tools https://www.w3.org/2007/08/pyRdfa/#distill_by_input, http://linter.structured-data.org/, and http://rdfa.info/play/ extract a-part.html as URI for the part.

I use multiple vocabularies in the wild...