projects
/
yaz-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ZOOM C: handle HTTP redirect for SRU GET
[yaz-moved-to-github.git]
/
src
/
record_conv.c
diff --git
a/src/record_conv.c
b/src/record_conv.c
index
41e9881
..
695f088
100644
(file)
--- a/
src/record_conv.c
+++ b/
src/record_conv.c
@@
-304,6
+304,12
@@
static int conv_marc(yaz_record_conv_t p, const xmlNode *ptr)
if (input_charset && !output_charset)
output_charset = "utf-8";
}
if (input_charset && !output_charset)
output_charset = "utf-8";
}
+ else if (!strcmp(output_format, "turbomarc"))
+ {
+ output_format_mode = YAZ_MARC_TURBOMARC;
+ if (input_charset && !output_charset)
+ output_charset = "utf-8";
+ }
else if (!strcmp(output_format, "marc"))
{
output_format_mode = YAZ_MARC_ISO2709;
else if (!strcmp(output_format, "marc"))
{
output_format_mode = YAZ_MARC_ISO2709;
@@
-473,7
+479,7
@@
static int yaz_record_conv_record_rule(yaz_record_conv_t p,
ret = -1;
}
else if (r->u.marc.input_format == YAZ_MARC_MARCXML ||
ret = -1;
}
else if (r->u.marc.input_format == YAZ_MARC_MARCXML ||
- r->u.marc.input_format == YAZ_MARC_TMARCXML)
+ r->u.marc.input_format == YAZ_MARC_TURBOMARC)
{
xmlDocPtr doc = xmlParseMemory(wrbuf_buf(record),
wrbuf_len(record));
{
xmlDocPtr doc = xmlParseMemory(wrbuf_buf(record),
wrbuf_len(record));
@@
-484,7
+490,7
@@
static int yaz_record_conv_record_rule(yaz_record_conv_t p,
}
else
{
}
else
{
- ret = yaz_marc_read_xml(mt, xmlDocGetRootElement(doc));
+ ret = yaz_marc_read_xml(mt, xmlDocGetRootElement(doc));
if (ret)
wrbuf_printf(p->wr_error, "yaz_marc_read_xml failed");
}
if (ret)
wrbuf_printf(p->wr_error, "yaz_marc_read_xml failed");
}