Added support for turbo xml (txml)
authorDennis Schafroth <dennis@indexdata.com>
Wed, 10 Mar 2010 08:22:19 +0000 (09:22 +0100)
committerAdam Dickmeiss <adam@indexdata.dk>
Mon, 22 Mar 2010 12:12:18 +0000 (13:12 +0100)
src/client.c

index 3ebf63b..0f9e220 100644 (file)
@@ -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");