From 4a2615d68317201c4662df95147bcc36cf1dd13f Mon Sep 17 00:00:00 2001 From: Dennis Schafroth Date: Wed, 10 Mar 2010 09:22:19 +0100 Subject: [PATCH] Added support for turbo xml (txml) --- src/client.c | 10 ++++++++++ 1 file changed, 10 insertions(+) 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"); -- 1.7.10.4