aboutsummaryrefslogtreecommitdiffstats
path: root/include/serd/reader.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2023-04-05 08:58:15 -0400
committerDavid Robillard <d@drobilla.net>2023-12-02 18:49:08 -0500
commita1b677851274b7e5295962658e723cab007f9b85 (patch)
treebb9de8a1addaa32f0e973e382b16b4c46b64e0de /include/serd/reader.h
parentb5956c4dc6b065d664908104d5fc6752a87e3364 (diff)
downloadserd-a1b677851274b7e5295962658e723cab007f9b85.tar.gz
serd-a1b677851274b7e5295962658e723cab007f9b85.tar.bz2
serd-a1b677851274b7e5295962658e723cab007f9b85.zip
Add SERD_READ_ORDERED to preserve blank node ordering in models
Diffstat (limited to 'include/serd/reader.h')
-rw-r--r--include/serd/reader.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/serd/reader.h b/include/serd/reader.h
index a2bde202..78b51d00 100644
--- a/include/serd/reader.h
+++ b/include/serd/reader.h
@@ -91,6 +91,16 @@ typedef enum {
the input document.
*/
SERD_READ_GENERATED = 1U << 4U,
+
+ /**
+ Generate blank node labels with suffixes left-padded with zeros.
+
+ This is useful because it makes generated blank node IDs like
+ "_:b0000000123" match the numerical order when compared as strings (or as
+ nodes). In particular, this can be used to preserve blank node ordering
+ from documents when the statements are sorted, such as in a model.
+ */
+ SERD_READ_ORDERED = 1U << 5U,
} SerdReaderFlag;
/// Bitwise OR of SerdReaderFlag values