[redland-dev] [SPAM?]-05.589 rdf:Seq

Dave Beckett dave at dajobe.org
Mon Nov 28 19:11:23 GMT 2005


Donald E Curtis wrote:
> But the problem is.  I need them in an ordering.  Now, i'm guessing IF i 
> did go that way, i could inherently get the correct ordering, but 
> truely, the language isn't correct unless i use a sequence for it.

This might be somewhere between "a bit of a hack" and "works":

with data like:

		<c:Components>
			<rdf:Seq>
				<rdf:_1 rdf:resource="file://home/mp/development/rci/components/rng" />
				<rdf:_2 rdf:resource="file://home/mp/development/rci/components/sum" />
			</rdf:Seq>
		</c:Components>

and SPARQL like:

PREFIX c: <http://milkbox.net/rad-schema#>
SELECT ?value
WHERE {
   [] c:Components [
          a         rdf:Seq ;
          ?property ?value;
      ] .
}
ORDER BY str(?property)

which will sort in URI order which will work for rdf:_1 to rdf:_9 at least.

Not tested of course, might be syntax errors above!

Dave


More information about the redland-dev mailing list