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
Reindent
[yaz-moved-to-github.git]
/
src
/
record_conv.c
diff --git
a/src/record_conv.c
b/src/record_conv.c
index
851ec9f
..
497203e
100644
(file)
--- a/
src/record_conv.c
+++ b/
src/record_conv.c
@@
-1,5
+1,5
@@
/* This file is part of the YAZ toolkit.
/* This file is part of the YAZ toolkit.
- * Copyright (C) 1995-2009 Index Data
+ * Copyright (C) 1995-2010 Index Data
* See the file LICENSE for details.
*/
/**
* See the file LICENSE for details.
*/
/**
@@
-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, "tmarcxml"))
+ {
+ output_format_mode = YAZ_MARC_TMARCXML;
+ 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;
@@
-472,7
+478,8
@@
static int yaz_record_conv_record_rule(yaz_record_conv_t p,
else
ret = -1;
}
else
ret = -1;
}
- else if (r->u.marc.input_format == YAZ_MARC_MARCXML)
+ else if (r->u.marc.input_format == YAZ_MARC_MARCXML ||
+ r->u.marc.input_format == YAZ_MARC_TMARCXML)
{
xmlDocPtr doc = xmlParseMemory(wrbuf_buf(record),
wrbuf_len(record));
{
xmlDocPtr doc = xmlParseMemory(wrbuf_buf(record),
wrbuf_len(record));