Skip to content

Commit

Permalink
iri: implementation in turtle doc
Browse files Browse the repository at this point in the history
but slow!
  • Loading branch information
nbittich committed Dec 1, 2024
1 parent 0cfee8b commit f829121
Show file tree
Hide file tree
Showing 6 changed files with 253 additions and 367 deletions.
18 changes: 18 additions & 0 deletions examples/turtle_doc/input/0029.ttl
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
@base <http://example.org/> .

# Define prefixes for namespaces (optional but common practice)
@prefix ex: <http://example.org/ns#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .

# Relative IRIs resolve against the base
<about> a foaf:Document ;
foaf:title "An Example Document" ;
foaf:maker <people/john-doe> .

# Use a prefix to reference another IRI
ex:item123 a ex:Product ;
ex:price "19.99"^^<http://www.w3.org/2001/XMLSchema#decimal> ;
ex:availableAt <store> .

# Fully qualified IRIs are unaffected by the base
<http://another.example.org/resource> ex:relatedTo ex:item123 .
10 changes: 10 additions & 0 deletions examples/turtle_doc/output/0029.ttl
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

<http://example.org/about> a <http://xmlns.com/foaf/0.1/Document> ;
<http://xmlns.com/foaf/0.1/title> "An Example Document" ;
<http://xmlns.com/foaf/0.1/maker> <http://example.org/people/john-doe> .

<http://example.org/ns#item123> a <http://example.org/ns#Product> ;
<http://example.org/ns#price> "19.99"^^<http://www.w3.org/2001/XMLSchema#decimal> ;
<http://example.org/ns#availableAt> <http://example.org/store> .

<http://another.example.org/resource> <http://example.org/ns#relatedTo> <http://example.org/ns#item123> .
Loading

0 comments on commit f829121

Please sign in to comment.