From: Dennis Schafroth Date: Wed, 10 Mar 2010 08:22:19 +0000 (+0100) Subject: Added support for turbo xml (txml) X-Git-Tag: v1.4.0~86 X-Git-Url: http://jsfdemo.indexdata.com/cgi-bin?a=commitdiff_plain;h=4a2615d68317201c4662df95147bcc36cf1dd13f;p=pazpar2-moved-to-github.git Added support for turbo xml (txml) --- diff --git a/src/client.c b/src/client.c index 3ebf63b..0f9e220 100644 --- a/src/client.c +++ b/src/client.c @@ -350,6 +350,11 @@ static int nativesyntax_to_type(struct session_database *sdb, char *type, { strcpy(type, "xml"); } + else if (!strncmp(s, "txml", 4)) + { + const char *cp = strchr(s, ';'); + yaz_snprintf(type, 80, "txml; charset=%s", cp ? cp+1 : "marc-8s"); + } else return -1; return 0; @@ -364,6 +369,11 @@ static int nativesyntax_to_type(struct session_database *sdb, char *type, strcpy(type, "xml"); return 0; } + else if (!strcmp(syntax, "TXML")) + { + strcpy(type, "txml"); + return 0; + } else if (!strcmp(syntax, "USmarc") || !strcmp(syntax, "MARC21")) { strcpy(type, "xml; charset=marc8-s");