summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/slv2_internal.h1
-rw-r--r--src/value.c3
-rw-r--r--src/world.c2
3 files changed, 5 insertions, 1 deletions
diff --git a/src/slv2_internal.h b/src/slv2_internal.h
index 7e3693a..9f6638c 100644
--- a/src/slv2_internal.h
+++ b/src/slv2_internal.h
@@ -224,6 +224,7 @@ struct _SLV2World {
SLV2Node slv2_dmanifest_node;
SLV2Node xsd_boolean_node;
SLV2Node xsd_decimal_node;
+ SLV2Node xsd_double_node;
SLV2Node xsd_integer_node;
SLV2Value doap_name_val;
SLV2Value lv2_name_val;
diff --git a/src/value.c b/src/value.c
index 104c977..b37050d 100644
--- a/src/value.c
+++ b/src/value.c
@@ -119,7 +119,8 @@ slv2_value_new_from_node(SLV2World world, SordNode node)
if (datatype_uri) {
if (sord_node_equals(datatype_uri, world->xsd_boolean_node))
type = SLV2_VALUE_BOOL;
- else if (sord_node_equals(datatype_uri, world->xsd_decimal_node))
+ else if (sord_node_equals(datatype_uri, world->xsd_decimal_node)
+ || sord_node_equals(datatype_uri, world->xsd_double_node))
type = SLV2_VALUE_FLOAT;
else if (sord_node_equals(datatype_uri, world->xsd_integer_node))
type = SLV2_VALUE_INT;
diff --git a/src/world.c b/src/world.c
index cc4641b..bc81319 100644
--- a/src/world.c
+++ b/src/world.c
@@ -92,6 +92,7 @@ slv2_world_new()
world->slv2_dmanifest_node = NEW_URI(SLV2_NS_SLV2 "dynamic-manifest");
world->xsd_boolean_node = NEW_URI(SLV2_NS_XSD "boolean");
world->xsd_decimal_node = NEW_URI(SLV2_NS_XSD "decimal");
+ world->xsd_double_node = NEW_URI(SLV2_NS_XSD "double");
world->xsd_integer_node = NEW_URI(SLV2_NS_XSD "integer");
world->doap_name_val = NEW_URI_VAL(SLV2_NS_DOAP "name");
@@ -148,6 +149,7 @@ slv2_world_free(SLV2World world)
slv2_node_free(world->slv2_dmanifest_node);
slv2_node_free(world->xsd_boolean_node);
slv2_node_free(world->xsd_decimal_node);
+ slv2_node_free(world->xsd_double_node);
slv2_node_free(world->xsd_integer_node);
slv2_value_free(world->doap_name_val);