Skip to content

Commit

Permalink
add 05-02-03 part1
Browse files Browse the repository at this point in the history
  • Loading branch information
Xiaoqi Zhao committed Oct 6, 2024
1 parent 8da3113 commit 748958e
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 0 deletions.
14 changes: 14 additions & 0 deletions ch05/05-02/05-02-03/ex241.ttl
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# filename: ex241.ttl

@prefix dm: <http://learningsparql.com.ns/demo#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix d: <http://learningsparql.com/ns/data#> .
@prefix xsd: <httP//www.w3.org/2001/XMLSchema#> .

d:id1 dm:location _:b1 .
d:id2 dm:location <http://dbpedia.org/resource/Montreal> .
d:id3 dm:amount 3 .
d:id4 dm:amount "4"^^xsd:integer .
d:id5 dm:amount 1.0e5 .
d:id6 rdfs:label "5 bucks" .
d:id7 dm:shipped true .
13 changes: 13 additions & 0 deletions ch05/05-02/05-02-03/ex246.rq
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# filename: ex246.rq

BASE <http://learningsparql.com/ns/demo#>

# SELECT *
CONSTRUCT {?s ?p ?testURI . }
# FROM <ex241.ttl>
WHERE {
?s ?p ?o .
BIND (URI(?o) AS ?testURI)
}

# 2024-10-06: "5 bucks" is not converted
11 changes: 11 additions & 0 deletions ch05/05-02/05-02-03/ex248.rq
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# filename: ex246.rq

BASE <http://learningsparql.com/ns/demo#>

# SELECT *
CONSTRUCT {?s ?p ?testURI . }
# FROM <ex241.ttl>
WHERE {
?s ?p ?o .
BIND (URI(ENCODE_FOR_URI(?o)) AS ?testURI)
}

0 comments on commit 748958e

Please sign in to comment.