On 6 juil. 07, at 15:41, Jan Polowinski wrote: > Hello! > > Where's the best place to influence the sorting of results returned by > the fresnel engine? Is it possible to use the SPARQL "ORDER BY" > functionality through fresnel? I'd like to avoid writing > comparators for > the search results and do this after retrieving the results.
Hello, Fresnel by itself does not let you specify how to sort results. You should do that before the RDF data is handled by Fresnel. It is true that you could also do that through a SPARQL selection expression in Fresnel. > I guess FRESNEL is not responsible for that, since sorting concerns > the > structure of the results as a whole and not the display of a single > instance. On the other hand the engine is passed the whole data > repository and then performs the selection, so maybe it should also > sort > it. Is it the only way to go to sort afterwards, or am I missing > something. I hope so, since at least in longwell I cant find any > xsl:sort expressions. Do I have to pass an already sorted data > repository to the engine? How could I do that? > > I tried specifying an order with fresnel using a SPARQL selector > for the > sorting, but this doesn't return any results. Does the fresnel engine > support SPARQL selectors and, if yes, is the syntax below correct? I > couldn't find the equivalent for fresnel:fslselector for sparql in the > docs in the section 1.3.3 SPARQL Selectors at > http://www.w3.org/2005/04/fresnel-info/manual/ . However > fresnel:sparqlSelector seems to be right, since fresnel:sparqlselector > returns a NullPointerException and fresnel:sparqlSelector doesn't) I believe the Simile Fresnel engine does not yet support SPARQL expressions as selectors. Neither does JFresnel (support for SPARQL planned to be implemented this fall). > :eventLens rdf:type fresnel:Lens ; > fresnel:purpose fresnel:defaultLens ; > # this works and selects events: > fresnel:classLensDomain hist:Event; > # this works either > #fresnel:instanceLensDomain "hist:Event"^^fresnel:fslSelector ; > # this doesn't work (No lenses matching the data found.): > fresnel:instanceLensDomain "SELECT ?event WHERE {?event rdf:type > hist:Event ; rdfs:label ?label } ORDER BY > (?label)"^^fresnel:sparqlSelector ; > > Does FSL support sorting? I couldn't find a note on that in the > documentation at least. No, FSL does not support sorting. You should see it as an XPath- inspired path language for RDF models. XPath by itself does not support sorting. best, Emmanuel -- Emmanuel Pietriga INRIA Futurs - Projet In Situ tel : +33 1 69 15 34 66 Bat 490, Université Paris-Sud fax : +33 1 69 15 65 86 91405 ORSAY Cedex FRANCE http://www.lri.fr/~pietriga _______________________________________________ General mailing list [email protected] http://simile.mit.edu/mailman/listinfo/general
