From: Heikki Levanto Date: Fri, 8 May 2015 12:14:41 +0000 (+0200) Subject: MPSPARQL-21: Add %t for unquoted expansion X-Git-Tag: v0.6~28 X-Git-Url: http://sru.miketaylor.org.uk/cgi-bin?a=commitdiff_plain;h=4485a14f767a62881d73b5b9c2993274d90b53bc;p=mp-sparql-moved-to-github.git MPSPARQL-21: Add %t for unquoted expansion --- diff --git a/src/sparql.c b/src/sparql.c index c738e5d..0f38d57 100644 --- a/src/sparql.c +++ b/src/sparql.c @@ -165,6 +165,21 @@ static int z_term(yaz_sparql_t s, WRBUF addinfo, WRBUF res, WRBUF vars, } wrbuf_puts(addinfo, ">"); break; + case 't': + 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; + } + break; case 'd': switch (term->which) {