diff options
Diffstat (limited to 'src/node.c')
-rw-r--r-- | src/node.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -45,6 +45,7 @@ typedef struct StaticNode { {sizeof(NS_XSD #name) - 1, 0, SERD_URI}, NS_XSD #name}; DEFINE_XSD_NODE(base64Binary) +DEFINE_XSD_NODE(boolean) DEFINE_XSD_NODE(decimal) DEFINE_XSD_NODE(integer) @@ -458,6 +459,13 @@ serd_digits(const double abs) } SerdNode* +serd_new_boolean(bool b) +{ + return serd_new_typed_literal(b ? serd_string("true") : serd_string("false"), + serd_node_string_view(&serd_xsd_boolean.node)); +} + +SerdNode* serd_new_decimal(const double d, const unsigned frac_digits, const SerdNode* const datatype) |