aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2021-06-28 19:25:30 -0400
committerDavid Robillard <d@drobilla.net>2023-04-06 07:19:11 -0400
commitc852ef7fbfaf00189f771f0163d796b0b73437ca (patch)
tree919fe138158963a427c2c634bb7c4524136cb430 /src
parent7935250bb40dda6d3f66c99b70ba92a3ff942832 (diff)
downloadserd-c852ef7fbfaf00189f771f0163d796b0b73437ca.tar.gz
serd-c852ef7fbfaf00189f771f0163d796b0b73437ca.tar.bz2
serd-c852ef7fbfaf00189f771f0163d796b0b73437ca.zip
Remove support for writing Turtle named inline nodes extension
Diffstat (limited to 'src')
-rw-r--r--src/writer.c36
1 files changed, 6 insertions, 30 deletions
diff --git a/src/writer.c b/src/writer.c
index 8fdca6f9..cdd925d7 100644
--- a/src/writer.c
+++ b/src/writer.c
@@ -592,21 +592,14 @@ is_name(const uint8_t* buf, const size_t len)
}
SERD_NODISCARD static SerdStatus
-write_uri_node(SerdWriter* const writer,
- const SerdNode* node,
- const Field field,
- const SerdStatementFlags flags)
+write_uri_node(SerdWriter* const writer,
+ const SerdNode* node,
+ const Field field)
{
SerdStatus st = SERD_SUCCESS;
SerdNode prefix = SERD_NODE_NULL;
SerdChunk suffix = {NULL, 0U};
- if (is_inline_start(writer, field, flags)) {
- ++writer->indent;
- TRY(st, write_sep(writer, SEP_ANON_BEGIN));
- TRY(st, esink("== ", 3, writer));
- }
-
const bool has_scheme = serd_uri_string_has_scheme(node->buf);
if (supports_abbrev(writer)) {
if (field == FIELD_PREDICATE &&
@@ -659,19 +652,11 @@ write_uri_node(SerdWriter* const writer,
}
TRY(st, esink(">", 1, writer));
- if (is_inline_start(writer, field, flags)) {
- TRY(st, esink(" ;", 2, writer));
- TRY(st, write_newline(writer));
- }
-
return SERD_SUCCESS;
}
SERD_NODISCARD static SerdStatus
-write_curie(SerdWriter* const writer,
- const SerdNode* node,
- const Field field,
- const SerdStatementFlags flags)
+write_curie(SerdWriter* const writer, const SerdNode* const node)
{
SerdChunk prefix = {NULL, 0};
SerdChunk suffix = {NULL, 0};
@@ -693,16 +678,7 @@ write_curie(SerdWriter* const writer,
write_uri(writer, suffix.buf, suffix.len);
TRY(st, esink(">", 1, writer));
} else {
- if (is_inline_start(writer, field, flags)) {
- ++writer->indent;
- TRY(st, write_sep(writer, SEP_ANON_BEGIN));
- TRY(st, esink("== ", 3, writer));
- }
write_lname(writer, node->buf, node->n_bytes);
- if (is_inline_start(writer, field, flags)) {
- TRY(st, esink(" ;", 2, writer));
- TRY(st, write_newline(writer));
- }
}
return st;
@@ -772,10 +748,10 @@ write_node(SerdWriter* writer,
st = write_literal(writer, node, datatype, lang, flags);
break;
case SERD_URI:
- st = write_uri_node(writer, node, field, flags);
+ st = write_uri_node(writer, node, field);
break;
case SERD_CURIE:
- st = write_curie(writer, node, field, flags);
+ st = write_curie(writer, node);
break;
case SERD_BLANK:
st = write_blank(writer, node, field, flags);