From cfd8100788158f0c421a43b4c2d8281a3992b1e3 Mon Sep 17 00:00:00 2001 From: Munyoki Kilyungi Date: Tue, 15 Aug 2023 18:25:31 +0300 Subject: Return "" for non-empty strings in string->identifier/annotate-field Signed-off-by: Munyoki Kilyungi --- dump/triples.scm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'dump') diff --git a/dump/triples.scm b/dump/triples.scm index 0206ba3..b0eb1e4 100644 --- a/dump/triples.scm +++ b/dump/triples.scm @@ -17,7 +17,8 @@ (else (error "Use a string/symbol")))] [string-field (if (number? field) (number->string field) field)]) - (if (string-null? string-field) + (if (or (and (string? string-field) (string-null? string-field)) + (eq? string-field #f)) "" (string->symbol (format #f "~s~a" string-field schema))))) @@ -29,7 +30,8 @@ (proc string-downcase)) "Convert STR to a turtle identifier after replacing illegal characters with an underscore and prefixing with gn:PREFIX." - (if (string-null? str) + (if (or (and (string? str) (string-null? str)) + (eq? str #f)) "" (string->symbol (string-append ontology prefix separator -- cgit v1.2.3