Hi experts,

I'm very new on the Marklogic/SPARQL/Xquery technology and I try build a
simple Web App that embed the results of a SPARQL query into an HTML page.


For example my query is the following :

PREFIX bio: <http://vocab.org/bio/0.1/>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
SELECT ?auteur ?jour ?date1 ?date2 ?nom
where { ?auteur foaf:birthday ?jour. ?auteur bio:birth ?date1. ?auteur
bio:death ?date2.
       OPTIONAL {?auteur foaf:name ?nom} }
ORDER BY (?jour)


I embedded it into XQuery like that :

import module namespace sem = "http://marklogic.com/semantics"; at
"/MarkLogic/semantics.xqy";

sem:sparql('
PREFIX bio: <http://vocab.org/bio/0.1/>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>

SELECT ?auteur ?jour ?date1 ?date2 ?nom
where { ?auteur foaf:birthday ?jour. ?auteur bio:birth ?date1. ?auteur
bio:death ?date2.
       OPTIONAL {?auteur foaf:name ?nom} }
ORDER BY (?jour)
')

it works fine.

I now want to get back the results fields of my query to build an html
rendering (let say an html table with a column for ?auteur and a column for
?nom ). Unfortunately I can't find the appropriate syntax.

Any help or example would be very appreciated.

Thanks,
Ludo
_______________________________________________
General mailing list
[email protected]
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to