diff options
author | Munyoki Kilyungi | 2023-07-17 21:23:29 +0300 |
---|---|---|
committer | BonfaceKilz | 2023-07-30 12:29:56 +0300 |
commit | 591c09003bc0ccf4e8739ac3e39d60d36132a9be (patch) | |
tree | d8d63a8559526c5cd96162376fffb724205718fe /dump/triples.scm | |
parent | 0743ac3e7727bd15a925345547c94376b949be18 (diff) | |
download | gn-transform-databases-591c09003bc0ccf4e8739ac3e39d60d36132a9be.tar.gz |
Make prefix function have an optional ttl?
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
Diffstat (limited to 'dump/triples.scm')
-rw-r--r-- | dump/triples.scm | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/dump/triples.scm b/dump/triples.scm index 700437a..33b4ae3 100644 --- a/dump/triples.scm +++ b/dump/triples.scm @@ -35,8 +35,12 @@ characters with an underscore and prefixing with gn:PREFIX." (string-downcase (string-trim-right str #\.))))))) -(define (prefix prefix iri) - (format #t "@prefix ~a ~a .~%" prefix iri)) +(define* (prefix prefix iri #:optional (ttl? #t)) + (format #t + (if ttl? + "@prefix ~a ~a .~%" + "PREFIX ~a ~a ~%") + prefix iri)) (define (ontology prefix value) (if (and (string? value) (string-null? value)) |