Skip to content

@LeifW /gist:514799
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.