[ Date Index ]
[ Thread Index ]
[ <= Previous by date /
thread ]
[ Next by date /
thread => ]
Re: [LUG] SPARCQL
- To: list@xxxxxxxxxxxxx
- Subject: Re: [LUG] SPARCQL
- From: Martin Gautier <martin.gautier@xxxxxxxxxxxxx>
- Date: Tue, 14 Sep 2021 16:44:19 +0100
- Content-language: en-GB
- Delivered-to: dclug@xxxxxxxxxxxxxxxxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dcglug.org.uk; s=1618045561; h=Sender:Content-Type: Content-Transfer-Encoding:Reply-To:List-Subscribe:List-Help:List-Post: List-Unsubscribe:List-Id:Subject:References:In-Reply-To:Date:To:From: MIME-Version:Message-Id:Cc:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner: List-Archive; bh=Bk8AaKpbfKUu+g5Kopd317bAFVquzN3mK3g0gNqbg6g=; b=XPuJIS8eBpeo YrS0qeMRNw0ouqzHzN5sUp8H5lGZtUVaDgPzc9+qL5pNZmuU6Uaggcnlrbba9gcP+obLyo9/aJoC2 NYZ/GlzGLvEBRrln1hsmvrHJsjRsaJBr8AQVOXTYJJfboRCD+Kh4MVVRgfdWdKBSS/DUZYUnxtwpG fPmH0=;
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/simple; q=dns/txt; d=myrnham.co.uk; i=martin.gautier@xxxxxxxxxxxxx; s=mailjet; h=message-id:mime-version:from:to:subject:date:list-unsubscribe:list-unsubscribe-post: feedback-id:in-reply-to:references:x-csa-complaints:x-mj-mid:x-mj-smtpguid: x-report-abuse-to:content-type:content-transfer-encoding:content-language; bh=jJ3HEUmm+T4UYmdSYJtE1IPuT4rt6vi/MhvhPYblkjU=; b=jcd3dvUlxsUr/1FncCrCuwP36rwRXaqqerI47ZesPageRQctn+tEbulnd cW5vlhQ6+AieqXHwEjow0FIIIKufv/05BheoR+gYkPLCRK/HezDLW8R608pF 3PoGmcEVUjXLEJIE1Iz5PHNZcBDchzRvbrRkrNC+ZHn3L1CJ0oSQQM=
- Feedback-id: 42.89391.85495:MJ
On 14/09/2021 15:43, Sebastian wrote:
Dear Martin,
...and here's the same query, but with JSON behind the scenes rather
than XML. The character escaping issue is still extant, unfortunately.
However, jq seems to be about five times faster than the Perl version of
xpath that I suggested in my previous email, so if you have jq installed
this may be preferable.
curl -s
'https://edmo.seadatanet.org/sparql/sparql?query=PREFIX+skos%3A%3Chttp%3A%2F%2Fwww.w3.org%2F2004%2F02%2Fskos%2Fcore%23%3E%0D%0APREFIX+rdf%3A%3Chttp%3A%2F%2Fwww.w3.org%2F1999%2F02%2F22-rdf-syntax-ns%23%3E%0D%0ASELECT+DISTINCT+%3Fs+%3Fp+WHERE+%7B%3Fs+rdf%3Atype+%3Chttp%3A%2F%2Fwww.w3.org%2Fns%2Forg%23Organization%3E.+%3Fs+skos%3AprefLabel+%3Fp%7D+ORDER+By+%3Fp&output=json&force-accept=text%2Fplain'\
| jq -r ".results.bindings[].p.value"\
| sort
Best wishes,
Sebastian
Wow. Excellent. Thanks for that.
--
The Mailing List for the Devon & Cornwall LUG
https://mailman.dcglug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/listfaq