Example:
ex:1 rdfs:comment "1" .
ex:1 rdfs:comment "blah1" .
ex:1 rdfs:comment "blah1" .
ex:1 rdfs:comment "blah2" .
ex:1 rdfs:comment "blah2"@en .
ex:1 rdfs:comment "utf8_text_with_&_amps_etc"@ax .
The following code can delete the first triple :
qr := sprintf('sparql with ex: delete { ?s rdfs:comment ?s_comm . }
where {?s rdf:type ex:o1 .
filter (?s = <%s>)
filter (?s_comm = "%s")
}', s_id, s_comm);
However, I can’t delete other lines from the example.
Questions:
1
What’s the best way to delete an [really long utf8] literal object ?
2
I can get a IRI_id using (<LONG::bif:iri_id_num>(?s)) AS ?s_id
for a node.
Is any similar function I can use to get id for a literal object and then delete it using this id ?
3
I can get “nodeID” for the whole triple and for the field using RDF/XML format:
fmt := 'RDF/XML';
qr := sprintf('sparql define output:format "%s" select distinct ?s ?s_comm { ?s ?p ?o . ?s rdf:type ex:o1 . ?s rdfs:comment ?s_comm} limit 1', fmt);
Will return:
<rs:results rdf:nodeID="rset">
<rs:result rdf:nodeID="sol193">
<rs:binding rdf:nodeID="sol193-0" .... /rs:binding>
<rs:binding rdf:nodeID="sol193-1" .... /rs:binding>
Can I use nodeID “sol193” or “sol193-1” to delete the triple somehow ?
Best regards