projects
/
pazpar2-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a308794
)
Added support for turbo xml (txml)
author
Dennis Schafroth
<dennis@indexdata.com>
Wed, 10 Mar 2010 08:22:19 +0000
(09:22 +0100)
committer
Dennis Schafroth
<dennis@indexdata.com>
Wed, 10 Mar 2010 08:22:19 +0000
(09:22 +0100)
src/client.c
patch
|
blob
|
history
diff --git
a/src/client.c
b/src/client.c
index
016d874
..
a380a86
100644
(file)
--- 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");