Improve nquads generation

Julien LepillerFri Apr 10 04:43:50+0200 2020

c5ec60b

Improve nquads generation

nquads/fromrdf.scm

3535
                    (if (rdf-literal-langtag node)
3636
                        (string-append "@" (rdf-literal-langtag node))
3737
                        (let ((type (rdf-literal-type node)))
38-
                          (string-append
39-
                            "^^" (if (rdf-datatype? type)
40-
                                     (car (rdf-datatype-iris type))
41-
                                     type))))))
38+
                          (if (equal? type "http://www.w3.org/2001/XMLSchema#string")
39+
                              ""
40+
                              (string-append
41+
                                "^^<"
42+
                                (if (rdf-datatype? type)
43+
                                    (car (rdf-datatype-iris type))
44+
                                    type)
45+
                                ">"))))))
4246
    ((string? node)
4347
     (string-append "<" node ">"))))
4448