summaryrefslogtreecommitdiffstats
path: root/src/sordi.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-05-11 22:57:00 +0000
committerDavid Robillard <d@drobilla.net>2011-05-11 22:57:00 +0000
commit9f6becfdd80dfe4cf1d99d0aefa8b257eb1b0c8d (patch)
treef9436edf22df60f6327babdcae00ea861d116a8f /src/sordi.c
parenta091efde0ab75c2ec2bfbb42cad083287fa891bc (diff)
downloadsord-9f6becfdd80dfe4cf1d99d0aefa8b257eb1b0c8d.tar.gz
sord-9f6becfdd80dfe4cf1d99d0aefa8b257eb1b0c8d.tar.bz2
sord-9f6becfdd80dfe4cf1d99d0aefa8b257eb1b0c8d.zip
Preserve serd node flags for pretty serialisation.
git-svn-id: http://svn.drobilla.net/sord/trunk@107 3d64ff67-21c5-427c-a301-fe4f08042e5a
Diffstat (limited to 'src/sordi.c')
-rw-r--r--src/sordi.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/sordi.c b/src/sordi.c
index 78f8690..1f663ea 100644
--- a/src/sordi.c
+++ b/src/sordi.c
@@ -65,7 +65,9 @@ serd_node_from_sord_node(const SordNode* n)
{
size_t n_bytes = 0;
const uint8_t* buf = sord_node_get_string_counted(n, &n_bytes);
- SerdNode sn = { (const uint8_t*)buf, n_bytes, n_bytes - 1, SERD_NOTHING };
+ SerdNode sn = {
+ (const uint8_t*)buf, n_bytes, n_bytes - 1, sord_node_get_flags(n), SERD_NOTHING
+ };
// FIXME: UTF-8
switch (sord_node_get_type(n)) {
case SORD_URI:
@@ -130,8 +132,9 @@ main(int argc, char** argv)
}
SerdEnv* env = serd_env_new();
- SerdWriter* writer = serd_writer_new(SERD_TURTLE, SERD_STYLE_ABBREVIATED,
- env, &base_uri, file_sink, stdout);
+ SerdWriter* writer = serd_writer_new(
+ SERD_TURTLE, SERD_STYLE_ABBREVIATED|SERD_STYLE_RESOLVED,
+ env, &base_uri, file_sink, stdout);
// Query
SordQuad pat = { 0, 0, 0, 0 };