From 95af44e1833c3641ebf65a6906495ab20c232a61 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 016d874..a380a86 100644 --- a/src/client.c +++ b/src/client.c @@ -344,6 +344,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; @@ -358,6 +363,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