Not very handy, but it works.
Thank you very much.
Emanuele
Il 2/18/11 4:00 PM, Damian Steer ha scritto:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 18/02/11 14:13, Emanuele Della Valle wrote:
Hi all,
Simple enough, but what if I want to put ?n in a RDF graph? I've tried
several variants of the following query but none appears to be
grammatically valid
PREFIX books:<http://example.org/book/>
PREFIX dc:<http://purl.org/dc/elements/1.1/>
CONSTRUCT { ?o<http://ex.org/n> (count(?o) as ?n) }
WHERE
{ ?s dc:creator ?o }
GROUP BY ?o
Can you help me?
Is this something that SPARQL 1.1 will enable?
It does indeed:
PREFIX books:<http://example.org/book/>
PREFIX dc:<http://purl.org/dc/elements/1.1/>
CONSTRUCT { ?o<http://ex.org/n> ?n }
WHERE
{
SELECT (count(?o) as ?n)
{ ?s dc:creator ?o }
GROUP BY ?o
}
Damian
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk1eiZUACgkQAyLCB+mTtymcZQCg6fVAkA4PvpWVyo03YwQK4USj
bUgAoJWOMKjrynoNNmgTUvlY9e4gbjHF
=39nR
-----END PGP SIGNATURE-----
--
Emanuele Della Valle
Politecnico di Milano
http://emanueledellavalle.org