A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.w3.org/TR/2008/REC-rdf-sparql-XMLres-20080115/result-to-html.xq below:

SPARQL Query Results to XHTML (XQuery)

{ for $name in $variableNames let $item := $result/res:binding[@name = $name] return { if ($item/res:bnode) then (: blank node value :) ( "nodeID ", $item/res:bnode/text() ) else if ($item/res:uri) then (: URI value :) ( "URI ", $item/res:uri/text() ) else if ($item/res:literal/@datatype) then (: datatyped literal value :) fn:concat ( $item/res:literal, " (datatype ", $item/res:literal/@datatype, ")" ) else if ($item/res:literal/@xml:lang) then (: lang-string :) fn:concat ( $item/res:literal, "@", $item/res:literal/@xml:lang ) else if ($item/res:literal/res:unbound) then (: unbound variable - empty cell :) "[unbound]" else if ( exists($item/res:literal/text()) ) then (: present and not empty :) $item/res:literal/text() else if ( exists($item/res:literal) ) then (: present and empty :) "[empty literal]" else (: unbound variable - empty cell :) "[unbound]" } }

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.3