From: Adam Dickmeiss Date: Tue, 28 Apr 2015 11:49:53 +0000 (+0200) Subject: %u variable: for MPSPARQL-12 X-Git-Tag: v0.5~8 X-Git-Url: http://sru.miketaylor.org.uk/cgi-bin?a=commitdiff_plain;h=aac18a7285df3b9f05095d4312025fd43700c6ce;p=mp-sparql-moved-to-github.git %u variable: for MPSPARQL-12 --- 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) {