diff options
author | David Robillard <d@drobilla.net> | 2018-06-03 12:49:44 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-10-27 13:13:58 +0100 |
commit | a16281bb03b2c524f0dfbc0381a3ad641d4a4dbb (patch) | |
tree | 9c71d1bdfcd35804c0b440974e5a4fd8c6658f79 /src | |
parent | 9eea9edc34189e9261417c8dff3fb369e517c2fd (diff) | |
download | serd-a16281bb03b2c524f0dfbc0381a3ad641d4a4dbb.tar.gz serd-a16281bb03b2c524f0dfbc0381a3ad641d4a4dbb.tar.bz2 serd-a16281bb03b2c524f0dfbc0381a3ad641d4a4dbb.zip |
Expand datatype of literal nodes in serd_env_expand_node
Diffstat (limited to 'src')
-rw-r--r-- | src/env.c | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -227,7 +227,18 @@ serd_env_expand_node(const SerdEnv* env, { switch (node->type) { case SERD_LITERAL: - break; + if (serd_node_datatype(node)) { + SerdNode* datatype = serd_env_expand_node( + env, serd_node_datatype(node)); + if (datatype) { + SerdNode* ret = serd_node_new_literal(serd_node_string(node), + datatype, + NULL); + serd_node_free(datatype); + return ret; + } + } + return NULL; case SERD_URI: return serd_node_new_resolved_uri_i( serd_node_string(node), &env->base_uri); |