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
Update cql.y for newer bison YAZ-720
[yaz-moved-to-github.git]
/
src
/
record_conv.c
diff --git
a/src/record_conv.c
b/src/record_conv.c
index
5edc28b
..
34a3cc3
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-2013 Index Data
+ * Copyright (C) Index Data
* See the file LICENSE for details.
*/
/**
* See the file LICENSE for details.
*/
/**
@@
-195,7
+195,6
@@
static void *construct_xslt(const xmlNode *ptr,
wrbuf_printf(wr_error, "Element <xslt>: "
"attribute 'stylesheet' expected");
nmem_destroy(nmem);
wrbuf_printf(wr_error, "Element <xslt>: "
"attribute 'stylesheet' expected");
nmem_destroy(nmem);
- return 0;
}
else
{
}
else
{
@@
-241,7
+240,6
@@
static void *construct_xslt(const xmlNode *ptr,
")");
xmlFreeDoc(info->xsp_doc);
nmem_destroy(info->nmem);
")");
xmlFreeDoc(info->xsp_doc);
nmem_destroy(info->nmem);
- return 0;
}
else
{
}
else
{
@@
-390,6
+388,10
@@
static void *construct_marc(const xmlNode *ptr,
if (!info->input_charset && info->output_charset)
info->input_charset = "utf-8";
}
if (!info->input_charset && info->output_charset)
info->input_charset = "utf-8";
}
+ else if (!strcmp(input_format, "json"))
+ {
+ info->input_format_mode = YAZ_MARC_JSON;
+ }
else
{
wrbuf_printf(wr_error, "Element <marc inputformat='%s'>: "
else
{
wrbuf_printf(wr_error, "Element <marc inputformat='%s'>: "
@@
-433,6
+435,12
@@
static void *construct_marc(const xmlNode *ptr,
if (info->input_charset && !info->output_charset)
info->output_charset = "utf-8";
}
if (info->input_charset && !info->output_charset)
info->output_charset = "utf-8";
}
+ else if (!strcmp(output_format, "json"))
+ {
+ info->output_format_mode = YAZ_MARC_JSON;
+ if (info->input_charset && !info->output_charset)
+ info->output_charset = "utf-8";
+ }
else
{
wrbuf_printf(wr_error, "Element <marc outputformat='%s'>: "
else
{
wrbuf_printf(wr_error, "Element <marc outputformat='%s'>: "