Seirdy<p>The four most popular ways to use RDF-based metadata on websites are RDFa-Core, RDFa-Lite, Microdata, and inline JSON-LD.</p><p>I can’t use RDFa-Lite because I need <code>rel</code> HTML attributes. <a href="https://www.ctrl.blog/entry/rdfa-link-attributes.html" rel="nofollow noopener noreferrer" target="_blank"><code>rel</code> silently upgrades RDFa-Lite to RDFa-Core</a>, 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 <a href="http://Schema.org" rel="nofollow noopener noreferrer" target="_blank">Schema.org</a> and Google’s documentation only documenting RDFa-Lite markup worsens the confusion. <i>Update 2024-12-16: <span><span><a href="https://csarven.ca/#i" rel="nofollow noopener noreferrer" target="_blank"><span><span>Sarven</span> <span>Capadisli</span></span></a></span> has <a href="https://csarven.ca/#i" rel="nofollow noopener noreferrer" target="_blank">clarified on the Fediverse</a> that this is the behavior of one faulty parser; <code>rel</code> only triggers an upgrade when used with an RDFa namespace. I may re-evaluate RDFa.</span></i></p><p>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 <a href="https://seirdy.one/posts/2024/05/30/google-document-warehouse-api-docs-leak/" rel="nofollow noopener noreferrer" target="_blank">this relatively short article</a> as an example. <a href="https://github.com/scrapinghub/extruct" rel="nofollow noopener noreferrer" target="_blank">Exruct</a> can convert the embedded Microdata into a massive JSON document featuring JSON-LD. <a href="https://paste.sr.ht/~seirdy/7db88ad2405d4ab685130cd513cd9defafd9d2cf" rel="nofollow noopener noreferrer" target="_blank">Take a look at the JSON-LD and HTML side by side</a>. Microdata attributes take a fraction of the footprint, encode the same information, and don’t require duplicating nearly the entire page.</p> <p>Originally posted on <code>seirdy.one</code>: <a href="https://seirdy.one/notes/2024/12/13/why-i-choose-microdata/" rel="nofollow noopener noreferrer" target="_blank">See Original</a> (<a href="https://indieweb.org/POSSE" rel="nofollow noopener noreferrer" target="_blank">POSSE</a>). <a class="hashtag" href="https://pleroma.envs.net/tag/microdata" rel="nofollow noopener noreferrer" target="_blank">#Microdata</a> <a class="hashtag" href="https://pleroma.envs.net/tag/semanticweb" rel="nofollow noopener noreferrer" target="_blank">#SemanticWeb</a> <a class="hashtag" href="https://pleroma.envs.net/tag/rdfa" rel="nofollow noopener noreferrer" target="_blank">#RDFa</a> <a class="hashtag" href="https://pleroma.envs.net/tag/html" rel="nofollow noopener noreferrer" target="_blank">#HTML</a></p>