w3c / json-ld-api

JSON-LD 1.1 Processing Algorithms and API Specification
https://w3c.github.io/json-ld-api/
Other
73 stars 29 forks source link

Unify document loading in Context Processing? #584

Open helins opened 6 months ago

helins commented 6 months ago

The Context Processing Algorithm deals with dereferencing remote documents at 2 occasions: 5.2 and 5.6. Both look very similar to the point where I do not understand why there are seemingly differences:

gkellogg commented 6 months ago

5.6.5 says what to do if loading the document fails; this would include cases where the URL is invalid.

5.2.4 is explicit about not dereferencing again, due to potential recursion loops. I don't think that the @import case had the same concern (@dlongley may recall), but implementations are generally encouraged to cache the result of retrieving external documents, which could be considered an expected optimization.

helins commented 6 months ago

Thanks @gkellogg. I guess not but would it make sense at all to also replicate 5.2.3 in 6, WRT to remote contexts?