From aac18a7285df3b9f05095d4312025fd43700c6ce Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Tue, 28 Apr 2015 13:49:53 +0200 Subject: [PATCH] %u variable: for MPSPARQL-12 --- src/sparql.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/sparql.c b/src/sparql.c index 3744fe6..d146458 100644 --- a/src/sparql.c +++ b/src/sparql.c @@ -183,6 +183,23 @@ static int apt(yaz_sparql_t s, WRBUF addinfo, WRBUF res, WRBUF vars, } wrbuf_puts(addinfo, "\""); break; + case 'u': + wrbuf_puts(addinfo, "<"); + switch (term->which) + { + case Z_Term_general: + wrbuf_json_write(addinfo, + term->u.general->buf, term->u.general->len); + break; + case Z_Term_numeric: + wrbuf_printf(addinfo, ODR_INT_PRINTF, *term->u.numeric); + break; + case Z_Term_characterString: + wrbuf_json_puts(addinfo, term->u.characterString); + break; + } + wrbuf_puts(addinfo, ">"); + break; case 'd': switch (term->which) { -- 1.7.10.4