W3C home > Mailing lists > Public > public-json-ld-wg@w3.org > April 2020

Re: HTML Content Algorithms dont' take external JSON-LD data into account

From: Pierre-Antoine Champin <pchampin@liris.cnrs.fr>
Date: Wed, 22 Apr 2020 12:08:33 +0200
Message-ID: <CA+OuRR-m44C0feXPGT2WJE-+9eVU_vduB3Mx91fcVeVrT_airw@mail.gmail.com>
To: "Hoekstra, Rinke (ELS-AMS)" <r.hoekstra@elsevier.com>
Cc: "public-json-ld-wg@w3.org" <public-json-ld-wg@w3.org>, "Breebaart, Matthijs (ELS-AMS)" <m.breebaart@elsevier.com>, "Townsend, Andrew S. (ELS)" <a.townsend@elsevier.com>
Dear Rinke,

if the JSON-LD document is available at its own IRI, you can pass this IRI
directly to your document loader.
Why would you want to pass the IRI of the HTML document?
I fail to see your use case...


On Tue, 21 Apr 2020 at 16:35, Hoekstra, Rinke (ELS-AMS) <
r.hoekstra@elsevier.com> wrote:

> Hi All,
> We stumbled upon something odd when going through the HTML Content
> Algorithms (section 9.5 of the JSON LD 1.1 API document, [1]).
> The algorithm extracts the JSON-LD from the textContent of script elements
> with a JSON-LD mime type as value for the "type" attribute.
> We have cases where, similar to e.g. JavaScript, our HTML documents refer
> to JSON-LD data that is hosted external to the HTML document itself.
> Our current approach is to use an empty script element with "type" set to
> the JSON-LD mime type, and "src" set to the dereferenceable IRI of the
> JSON-LD dataset that we want to process.
> Our assumption was that JSON-LD processing of HTML documents would
> automatically consume these external datasets, but the current algorithm
> doesn't allow for this. That is, if we indeed read the specs correctly.
> I appreciate that it's a bit late in the game, but it would be good to at
> least have the algorithm state explicitly that loading such external
> JSON-LD data using a "src" attribute is OPTIONAL. We'd rather not
> standardise on this internally when the JSON-LD spec may opt for using e.g.
> link elements at a later stage.
> Thanks,
> Rinke
> [1] https://www.w3.org/TR/json-ld11-api/#html-content-algorithms
> ---
> Dr. Rinke Hoekstra
> Lead Architect - Knowledge
> Elsevier​, Amsterdam
> r.hoekstra@elsevier.com
> ------------------------------
> Elsevier B.V. Registered Office: Radarweg 29, 1043 NX Amsterdam, The
> Netherlands, Registration No. 33156677, Registered in The Netherlands.
Received on Wednesday, 22 April 2020 10:08:59 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 April 2020 10:09:01 UTC