Datatypes - patzomir/xsparql GitHub Wiki

URIs

The only xQuery values that will be converted to URI are those specifically enclosed in <>:

  • As string:
let $x := "http://test.com/"
construct {foaf:s foaf:o {$x}.}
  • As URI:
let $x := "http://test.com/"
construct {foaf:s foaf:o <{$x}>.}

Other Datatypes

All other datatypes can be inserted as follows

let $x := "2"
construct {foaf:s foaf:o {$x}^^xs:integer.}

xQuery datatypes will be carried to RDF

let $check := xs:gYearMonth("2016-12")
construct {foaf:dfd foaf:fdsf {$check}.}

outputs: foaf:dfd foaf:fdsf "2016-12"^^xs:gYearMonth .

⚠️ **GitHub.com Fallback** ⚠️