diff options
author | Munyoki Kilyungi | 2023-08-15 18:25:31 +0300 |
---|---|---|
committer | Munyoki Kilyungi | 2023-08-15 19:32:48 +0300 |
commit | cfd8100788158f0c421a43b4c2d8281a3992b1e3 (patch) | |
tree | dfc215d19c9a794d0f50ecd315e9c68cd7f3fbec /dump | |
parent | c1cb2b5e5dfc6647f8c0c35fe6ad392cdd4fdfd7 (diff) | |
download | gn-transform-databases-cfd8100788158f0c421a43b4c2d8281a3992b1e3.tar.gz |
Return "" for non-empty strings in string->identifier/annotate-field
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
Diffstat (limited to 'dump')
-rw-r--r-- | dump/triples.scm | 6 |
1 files changed, 4 insertions, 2 deletions
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 |