Created
August 9, 2010 01:34
-
-
Save LeifW/514799 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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