From 289698b4eb3ef1e4a41db3947a0f19d27fd78717 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 3 Jun 2018 12:49:44 +0200 Subject: Expand datatype of literal nodes in serd_env_expand_node --- src/env.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/env.c b/src/env.c index 2439d1b6..d36082c1 100644 --- a/src/env.c +++ b/src/env.c @@ -235,6 +235,18 @@ serd_env_expand_node(const SerdEnv* env, ret->n_bytes = len; return ret; } + case SERD_LITERAL: + if (serd_node_get_datatype(node)) { + SerdNode* datatype = serd_env_expand_node( + env, serd_node_get_datatype(node)); + if (datatype) { + SerdNode* ret = serd_node_new_literal( + serd_node_get_string(node), datatype, NULL); + serd_node_free(datatype); + return ret; + } + } + return NULL; case SERD_URI: return serd_node_new_resolved_uri_i( serd_node_get_string(node), &env->base_uri); -- cgit v1.2.1