From 7269c12bbe4532f5f5844aaec16cf1bb75a1c71c Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 15 Apr 2021 17:52:44 -0400 Subject: 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. --- include/serd/serd.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/serd') diff --git a/include/serd/serd.h b/include/serd/serd.h index 0db6205f..7be9395c 100644 --- a/include/serd/serd.h +++ b/include/serd/serd.h @@ -215,6 +215,7 @@ typedef enum { SERD_ERR_BAD_WRITE, ///< Error writing to file/stream SERD_ERR_NO_DATA, ///< Unexpected end of input SERD_ERR_BAD_CALL, ///< Invalid call + SERD_ERR_BAD_URI, ///< Invalid or unresolved URI } SerdStatus; /** @@ -1739,6 +1740,8 @@ typedef enum { SERD_READ_LAX = 1u << 0u, ///< Tolerate invalid input where possible SERD_READ_VARIABLES = 1u << 1u, ///< Support variable nodes SERD_READ_EXACT_BLANKS = 1u << 2u, ///< Allow clashes with generated blanks + SERD_READ_PREFIXED = 1u << 3u, ///< Do not expand prefixed names + SERD_READ_RELATIVE = 1u << 4u, ///< Do not expand relative URI references } SerdReaderFlag; /// Bitwise OR of SerdReaderFlag values -- cgit v1.2.1