aboutsummaryrefslogtreecommitdiffstats
path: root/src/writer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/writer.c')
-rw-r--r--src/writer.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/writer.c b/src/writer.c
index 30b8bb4e..7b821145 100644
--- a/src/writer.c
+++ b/src/writer.c
@@ -1434,6 +1434,10 @@ serd_writer_set_prefix(SerdWriter* writer,
if (writer->syntax == SERD_TURTLE || writer->syntax == SERD_TRIG) {
TRY(st, terminate_context(writer));
+ if (writer->flags & SERD_WRITE_CONTEXTUAL) {
+ return st;
+ }
+
TRY(st, esink("@prefix ", 8, writer));
TRY(st, esink(serd_node_string(name), name->length, writer));
TRY(st, esink(": <", 3, writer));