public
Last active

  • Download Gist
gistfile1.sh
Shell
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
import module namespace _xsparql = "http://xsparql.deri.org/XSPARQLer/xsparql.xquery"
at "http://xsparql.deri.org/XSPARQLer/xsparql.xquery";
 
declare namespace mp = "http://musicpath.org" ;
declare namespace _sparql_result = "http://www.w3.org/2005/sparql-results#";
 
declare namespace foaf = "http://xmlns.com/foaf/0.1/" ;
declare variable $_NS1 := "prefix foaf: <http://xmlns.com/foaf/0.1/>";
<html> <head> </head><body> {
let $_aux1 := _xsparql:_serialize(( $_NS1, "
select $name where { <http://musicpath.org/people/melissa> foaf:givenname $name . } "))
for $_aux_result1 at $_aux_result1_Pos in mp:sparql($_aux1)//_sparql_result:result
let $_name_Node := ($_aux_result1/_sparql_result:binding[@name = "name"])
let $_name_NodeType := name($_name_Node/*)
let $_name_NodeDatatype := string($_name_Node/*/@datatype)
let $_name_NodeLang := string($_name_Node/*/@lang)
let $name := data($_name_Node/*)
let $_name_RDFTerm := _xsparql:_rdf_term($_name_NodeType, $name, $_name_NodeLang, $_name_NodeDatatype )
return <li>{ $name }</li> } </body></html>

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.