diff options
Diffstat (limited to 'src/writer.c')
-rw-r--r-- | src/writer.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/writer.c b/src/writer.c index fc8f86b4..3e918a0c 100644 --- a/src/writer.c +++ b/src/writer.c @@ -512,7 +512,8 @@ write_uri_node(SerdWriter* const writer, return sink("a", 1, writer) == 1; } else if (supports_abbrev(writer) && !strcmp(node_str, NS_RDF "nil")) { return sink("()", 2, writer) == 2; - } else if (has_scheme && (writer->style & SERD_STYLE_CURIED) && + } else if (has_scheme && supports_abbrev(writer) && + !(writer->style & SERD_STYLE_UNQUALIFIED) && serd_env_qualify_in_place(writer->env, node, &prefix, &suffix) && is_name(serd_node_string(prefix), serd_node_length(prefix)) && is_name(suffix.buf, suffix.len)) { @@ -523,7 +524,8 @@ write_uri_node(SerdWriter* const writer, } write_sep(writer, SEP_URI_BEGIN); - if (writer->style & SERD_STYLE_RESOLVED) { + if (!(writer->style & SERD_STYLE_UNRESOLVED) && + serd_env_base_uri(writer->env)) { const SerdURI* base_uri = serd_env_get_parsed_base_uri(writer->env); SerdURI uri; SerdURI abs_uri; |