aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/normalise.c2
-rw-r--r--tests/normalise/test-normalise.nt1
-rw-r--r--tests/normalise/test-normalise.ttl2
3 files changed, 5 insertions, 0 deletions
diff --git a/src/normalise.c b/src/normalise.c
index 34f97f71..bdf6d871 100644
--- a/src/normalise.c
+++ b/src/normalise.c
@@ -217,6 +217,8 @@ serd_node_normalise(const SerdEnv* env, const SerdNode* const node)
INTEGER_TYPE_LEN,
(int (*)(const void*, const void*))strcmp)) {
result = serd_normalise_integer(str, datatype);
+ } else if (!strcmp(datatype_uri, NS_RDF "langString")) {
+ result = serd_new_string(serd_node_string(node));
}
serd_node_free(datatype);
diff --git a/tests/normalise/test-normalise.nt b/tests/normalise/test-normalise.nt
index e23989ec..d2eff5a2 100644
--- a/tests/normalise/test-normalise.nt
+++ b/tests/normalise/test-normalise.nt
@@ -63,6 +63,7 @@ _:b1 <http://example.org/integer> "0"^^<http://www.w3.org/2001/XMLSchema#nonNega
_:b1 <http://example.org/integer> "36893488147419103232"^^<http://www.w3.org/2001/XMLSchema#nonNegativeInteger> .
_:b1 <http://example.org/integer> "1"^^<http://www.w3.org/2001/XMLSchema#positiveInteger> .
_:b1 <http://example.org/integer> "36893488147419103232"^^<http://www.w3.org/2001/XMLSchema#positiveInteger> .
+_:b1 <http://example.org/langString> "no language tag" .
_:b1 <http://example.org/other> "untyped" .
_:b1 <http://example.org/other> <http://example.org/uri> .
_:b1 <http://example.org/other> "notxsd"^^<http://example.org/sometype> .
diff --git a/tests/normalise/test-normalise.ttl b/tests/normalise/test-normalise.ttl
index 3db64f39..85dd2456 100644
--- a/tests/normalise/test-normalise.ttl
+++ b/tests/normalise/test-normalise.ttl
@@ -1,4 +1,5 @@
@base <http://example.org/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
[
@@ -67,6 +68,7 @@
" 036893488147419103232 "^^xsd:nonNegativeInteger ,
" +01 "^^xsd:positiveInteger ,
" 036893488147419103232 "^^xsd:positiveInteger ;
+ <langString> "no language tag"^^rdf:langString ;
<other> "untyped" ,
<uri> ,
"notxsd"^^<sometype> ,