summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS3
-rw-r--r--src/sratom.c8
2 files changed, 10 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index a6214d6..1b0d3fa 100644
--- a/NEWS
+++ b/NEWS
@@ -1,8 +1,9 @@
sratom (0.4.3) unstable;
* Escape invalid characters when writing paths as URIs
+ * Fancier printing without subject and predicate
- -- David Robillard <d@drobilla.net> Sun, 24 Mar 2013 17:51:07 -0400
+ -- David Robillard <d@drobilla.net> Sat, 08 Jun 2013 15:33:31 -0400
sratom (0.4.2) stable;
diff --git a/src/sratom.c b/src/sratom.c
index 8c2249c..584be8c 100644
--- a/src/sratom.c
+++ b/src/sratom.c
@@ -424,6 +424,14 @@ sratom_write(Sratom* sratom,
}
if (object.buf) {
+ SerdNode def_s = serd_node_from_string(SERD_BLANK, USTR("atom"));
+ SerdNode def_p = serd_node_from_string(SERD_URI, USTR(NS_RDF "value"));
+ if (!subject) {
+ subject = &def_s;
+ }
+ if (!predicate) {
+ predicate = &def_p;
+ }
sratom->write_statement(sratom->handle, flags, NULL,
subject, predicate, &object, &datatype, &language);
}