From 8c67f9eba47d30913749e607c440b170a5cbd804 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 15 Apr 2021 17:52:44 -0400 Subject: [WIP] Expand URIs in reader This expands relative and prefixed URIs in the reader on the stack, rather than passing them to the caller to be dealt with. This pushes these context-full forms to the edge of the system as much as possible to minimise the headaches they can cause. Towards having stricter guarantees about nodes and eliminating the CURIE node type altogether. --- src/env.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/env.h') diff --git a/src/env.h b/src/env.h index 21ce169a..a4f0e1ed 100644 --- a/src/env.h +++ b/src/env.h @@ -20,6 +20,14 @@ serd_env_qualify_in_place(const SerdEnv* env, const SerdNode** prefix, SerdStringView* suffix); +/** + Return the URI for the prefix with the given name. + + If no such prefix is known, returns an empty string view. +*/ +ZIX_PURE_FUNC SerdStringView +serd_env_find_prefix(const SerdEnv* env, SerdStringView name); + /** Expand `curie`. -- cgit v1.2.1