From 591c09003bc0ccf4e8739ac3e39d60d36132a9be Mon Sep 17 00:00:00 2001 From: Munyoki Kilyungi Date: Mon, 17 Jul 2023 21:23:29 +0300 Subject: Make prefix function have an optional ttl? Signed-off-by: Munyoki Kilyungi --- dump/triples.scm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'dump/triples.scm') 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)) -- cgit v1.2.3