aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2023-05-04 11:32:35 -0400
committerDavid Robillard <d@drobilla.net>2023-12-02 18:49:08 -0500
commitfa4c14acdeeabaf7aee0304a57ae7878ecea1776 (patch)
tree5b43e86ecac55c9cee0056a2ce7a94c0f01aecbc /include
parentfac7901dca0b4821582c6062600d37ac987082d9 (diff)
downloadserd-fa4c14acdeeabaf7aee0304a57ae7878ecea1776.tar.gz
serd-fa4c14acdeeabaf7aee0304a57ae7878ecea1776.tar.bz2
serd-fa4c14acdeeabaf7aee0304a57ae7878ecea1776.zip
Add a reader flag to disable generated blank label avoidance
Diffstat (limited to 'include')
-rw-r--r--include/serd/reader.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/serd/reader.h b/include/serd/reader.h
index e25565cb..d62428cf 100644
--- a/include/serd/reader.h
+++ b/include/serd/reader.h
@@ -67,6 +67,21 @@ typedef enum {
a syntax error.
*/
SERD_READ_VERBATIM = 1U << 2U,
+
+ /**
+ Read generated blank node labels exactly without adjusting them.
+
+ Normally, the reader will adapt blank node labels in the input that clash
+ with its scheme for generating new ones, for example mapping "_:b123" to
+ "_:B123". This flag disables that, so that blank node labels are passed
+ to the sink exactly as they are in the input.
+
+ Note that this flag should be used carefully, since it can result in data
+ corruption. Specifically, if the input is a syntax like Turtle with
+ anonymous nodes, the generated IDs for those nodes may clash with IDs from
+ the input document.
+ */
+ SERD_READ_GENERATED = 1U << 3U,
} SerdReaderFlag;
/// Bitwise OR of SerdReaderFlag values