W3C home > Mailing lists > Public > www-rdf-interest@w3.org > February 2004

RDQL - How to read the content of a bag?

From: <carsten@spichal.com>
Date: Mon, 2 Feb 2004 14:54:02 +0100
To: <www-rdf-interest@w3.org>
Message-Id: <6185270$1075729503401e545fb56c61.56859383@config11.schlund.de>

Hi everybody!

We are working with Jena 2.0. Right now we have some problems to
retrieve the content of a RDF-bag. The RDF-data is build like this:

<?xml version="1.0"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
	<dc:title>Practical digital libraries dbooks, bytes, and
			<rdf:li>Special collections</rdf:li>
			<rdf:li>Computer files</rdf:li>
			<rdf:li>United States</rdf:li>
			<rdf:li>Digital libraries</rdf:li>
			<rdf:li>Elektronische Bibliothek</rdf:li>
					<rdf:value>BUB 160</rdf:value>

We have two questions: 
How can we retrieve a specific content of a bag? 

This is our query and the result! In line 6 of the query we try to
recall the first element of the first bag. This works so far, but we
would like to recall the whole bag. In the result we get also the b-node
of the second bag. But we would like to avoid this because we are
interested in retrieving the content of a specific bag (in this case the
first bag).

SELECT ?person,?title,?liste
WHERE (?x, <dc:title>, ?title),
      (?x, <dc:creator>, ?name),
      (?name, <vCard:Family>, ?person),
      (?x, <dc:subject>, ?bag),
      (?bag, <rdf:_1>, ?liste)
USING dc FOR <http://purl.org/dc/elements/1.1/>,
      vCard FOR <http://www.w3.org/2001/vcard-rdf/3.0#>, 
      rdf FOR <http://www.w3.org/1999/02/22-rdf-syntax-ns#>   

person       | title                       | liste                     
"Lesk"       | "Practical digital ..."     | "Libraries"               
"Lesk"       | "Practical digital ..."     <15ac3c9:fa766df73b:-7ffc>  

And how can we distinguish between the two bags in the RDQL-Query?
It would be nice if you could help us!

A lot of greetings from Hildesheim, Germany!


Carsten Spichal
Samelsonplatz 4
31141 Hildesheim
Received on Monday, 2 February 2004 08:56:51 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:07:49 UTC