- From: Stian Soiland-Reyes <soiland-reyes@manchester.ac.uk>
- Date: Thu, 9 Nov 2023 00:39:09 +0000
- To: Sebastian Hellmann <hellmann@informatik.uni-leipzig.de>
- Cc: Melvin Carvalho <melvincarvalho@gmail.com>, public-webid <public-webid@w3.org>
On Wed, 08 Nov 2023 20:50:26 +0100 Sebastian Hellmann <hellmann@informatik.uni-leipzig.de> wrote: > I punched both your examples into https://json-ld.org/playground/ and > they are returning nothing (Melvin's example from github doc) or > _:b0 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> > <http://xmlns.com/foaf/0.1/PersonalProfileDocument> . > _:b0 <http://xmlns.com/foaf/0.1/primaryTopic> _:b1 . > (Stian's example) > > Could you send an example that is working with the N-Quads tab from the > playground or is the playground buggy? N-Quads don't permit relative IRIs like "#me" and the JSON-LD playground will drop any quads using these in the N-Quads and Table display. Under Options in JSON-LD playground (and parameters of most JSON-LD parser) you can set a custom Base like http://example.com/ to get: <http://example.com/#me> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> _:b1 . <http://example.com/#me> <http://xmlns.com/foaf/0.1/name> "Stian Soiland-Reyes" _:b1 . _:b0 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/PersonalProfileDocument> . _:b0 <http://xmlns.com/foaf/0.1/primaryTopic> _:b1 . If merging many of these programmatically, rather use a UUID-derived base like arcp://uuid,d6a8751d-ba8a-421b-aec9-bc5cb2858e07/ Former version of JSON-LD Playground use the base URI of itself, which gave odd results. Finding the resolved base URI has been made simpler in RDF 1.1 (Content-Location can now be ignored), but is still something many developers get wrong, which mean using "#me" and "" identifiers is error-prone without careful declaration of an explicit @base. -- Stian Soiland-Reyes, The University of Manchester https://www.esciencelab.org.uk/ https://orcid.org/0000-0001-9842-9718 Please note that I may work flexibly - whilst it suits me to email now, I do not expect a response or action outside of your own working hours.
Received on Thursday, 9 November 2023 00:39:19 UTC