diff options
author | David Robillard <d@drobilla.net> | 2019-10-14 23:26:41 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-10-27 13:13:59 +0100 |
commit | 80fb6d0ff7c093466ac70b38be5676b868516c08 (patch) | |
tree | 9589dad1cae377a3c7e11aa7983106ac9d24afd0 /serd | |
parent | 7f1d50b40814db24573b9eb425566ce1d44d2e85 (diff) | |
download | serd-80fb6d0ff7c093466ac70b38be5676b868516c08.tar.gz serd-80fb6d0ff7c093466ac70b38be5676b868516c08.tar.bz2 serd-80fb6d0ff7c093466ac70b38be5676b868516c08.zip |
Add support for basic literal normalisation
Diffstat (limited to 'serd')
-rw-r--r-- | serd/serd.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/serd/serd.h b/serd/serd.h index d57dc00c..2574a592 100644 --- a/serd/serd.h +++ b/serd/serd.h @@ -658,6 +658,11 @@ SERD_API SerdNode* serd_new_resolved_uri(const char* str, const SerdNode* base); +/// Return a normalised version of `node` if possible, NULL otherwise +SERD_API +SerdNode* +serd_node_normalise(const SerdEnv* env, const SerdNode* node); + /** Resolve `node` against `base` @@ -1213,6 +1218,22 @@ serd_sink_write_end(const SerdSink* sink, const SerdNode* node); /** @} + @name Stream Processing + @{ +*/ + +/** + Return a sink that normalises literal nodes in statements where possible. + + The returned sink acts like `target` in all respects, except literal nodes + in statements may be modified from the original. +*/ +SERD_API +SerdSink* +serd_normaliser_new(const SerdSink* target, const SerdEnv* env); + +/** + @} @name Reader @{ */ |