diff options
author | David Robillard <d@drobilla.net> | 2021-08-12 12:56:03 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2022-01-28 21:57:07 -0500 |
commit | 4339b6f9cb0da8a9d6519077f4a0ecc385cc382c (patch) | |
tree | aad416437aaac4b0bb47354da7cd2070912f8050 /include | |
parent | 90828959c762b0e6d2c318032e714ca39e8e6edb (diff) | |
download | serd-4339b6f9cb0da8a9d6519077f4a0ecc385cc382c.tar.gz serd-4339b6f9cb0da8a9d6519077f4a0ecc385cc382c.tar.bz2 serd-4339b6f9cb0da8a9d6519077f4a0ecc385cc382c.zip |
Add a reader flag to disable generated blank label avoidance
Diffstat (limited to 'include')
-rw-r--r-- | include/serd/serd.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/serd/serd.h b/include/serd/serd.h index e99e4e6a..3f59ded6 100644 --- a/include/serd/serd.h +++ b/include/serd/serd.h @@ -2299,6 +2299,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 |