aboutsummaryrefslogtreecommitdiffstats
path: root/include/serd/serd.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/serd/serd.h')
-rw-r--r--include/serd/serd.h31
1 files changed, 20 insertions, 11 deletions
diff --git a/include/serd/serd.h b/include/serd/serd.h
index 3f59ded6..c30c656b 100644
--- a/include/serd/serd.h
+++ b/include/serd/serd.h
@@ -2287,18 +2287,27 @@ typedef enum {
SERD_READ_VARIABLES = 1u << 1u,
/**
- Read URIs and blank node labels exactly.
+ Read relative URI references exactly without resolving them.
- Normally, the reader expands all relative URIs, and may adjust blank node
- labels to avoid clashing with generated ones. This flag disables all of
- this processing, so that URI references and blank nodes are passed to the
- sink exactly as they are in the input.
+ Normally, the reader expands all relative URIs against the base URI. This
+ flag disables that, so that URI references are passed to the sink exactly
+ as they are in the input.
+ */
+ SERD_READ_RELATIVE = 1u << 2u,
+
+ /**
+ Read blank node labels without adding a prefix unique to the document.
- Note that this does not apply to CURIEs, since serd deliberately does not
- have a way to represent CURIE nodes. A bad namespace prefix is considered
- a syntax error.
+ Normally, the reader adds a prefix like "f1", "f2", and so on, to blank
+ node labels, to separate the namespaces from separate input documents.
+ This flag disables that, so that blank node labels will be read without
+ any prefix added.
+
+ Note that this flag should be used carefully, since it can result in data
+ corruption. Specifically, if data from separate documents parsed with
+ this flag is combined, the IDs from each document may clash.
*/
- SERD_READ_VERBATIM = 1u << 2u,
+ SERD_READ_GLOBAL = 1u << 3u,
/**
Read generated blank node labels exactly without adjusting them.
@@ -2313,7 +2322,7 @@ typedef enum {
anonymous nodes, the generated IDs for those nodes may clash with IDs from
the input document.
*/
- SERD_READ_GENERATED = 1u << 3u,
+ SERD_READ_GENERATED = 1u << 4u,
} SerdReaderFlag;
/// Bitwise OR of SerdReaderFlag values
@@ -2507,7 +2516,7 @@ typedef enum {
potentially writem them as relative URI references. This flag disables
that, so URI nodes are written exactly as they are received.
- When fed by a reader with #SERD_READ_VERBATIM enabled, this will write URI
+ When fed by a reader with #SERD_READ_RELATIVE enabled, this will write URI
references exactly as they are in the input.
*/
SERD_WRITE_VERBATIM = 1u << 2u,