The four most popular ways to use RDF-based metadata on websites are RDFa-Core, RDFa-Lite, Microdata, and inline JSON-LD.

I can’t use RDFa-Lite because I need rel HTML attributes. rel silently upgrades RDFa-Lite to RDFa-Core, which parses differently. I doubt all parsers upgrade correctly; some will try to parse RDFa-Core as RDFa-Lite. Conformant RDFa parsers upgrade RDFa-Lite pages to RDFa-Core despite many authors only being familiar with RDFa-Lite. I suppose resources like Schema.org and Google’s documentation only documenting RDFa-Lite markup worsens the confusion. Update 2024-12-16: Sarven Capadisli has clarified on the Fediverse that this is the behavior of one faulty parser; rel only triggers an upgrade when used with an RDFa namespace. I may re-evaluate RDFa.

With RDFa split between two incompatible alternatives with a confusing upgrade mechanism, the alternatives are Microdata and JSON-LD. I use structured data extensively; JSON-LD would duplicate most of the page. Let’s use this relatively short article as an example. Exruct can convert the embedded Microdata into a massive JSON document featuring JSON-LD. Take a look at the JSON-LD and HTML side by side. Microdata attributes take a fraction of the footprint, encode the same information, and don’t require duplicating nearly the entire page.


Originally posted on seirdy.one: See Original (POSSE). #Microdata #SemanticWeb #RDFa #HTML

This entry was edited (3 months ago)

Seirdy reshared this.

in reply to Seirdy

My approach:

* all human-readable information is visible and actionable in markup languages (HTML, SVG, MathML..)
* anything significant has a URI and machine-readable.

For my purposes, publishing various types of content and working on an application ( dokie.li/ ) - it comes down to using the full expressivity of #RDFa.

Why RDFa: csarven.ca/linked-research-dec…

#rdfa
in reply to Seirdy

Hope I understood you correctly; not trying to change your mind:

Unless you've already checked w/ other #RDFa parsers, I wouldn't rely on GRRT (referenced blog post). AFAICT, GRRT wasn't parsing the HTML snippet correctly back then nor now for that HTML snippet.

If you don't use the `vocab` attribute, values like `license` are ignored by the RDFa parser (unless host language's default vocab is applied). For anything else parsing plain ol' rel=license, that's not an issue anyway.

#rdfa
in reply to Seirdy

Update 2024-12-16: @csarven has clarified on the Fediverse that I described the behavior of one faulty parser; rel only triggers an upgrade when used with an RDFa namespace. I may re-evaluate RDFa.
This entry was edited (3 months ago)

Seirdy reshared this.