/* This file is part of the YAZ toolkit.
- * Copyright (C) 1995-2013 Index Data
+ * Copyright (C) Index Data
* See the file LICENSE for details.
*/
/**
wrbuf_printf(wr_error, "Element <xslt>: "
"attribute 'stylesheet' expected");
nmem_destroy(nmem);
- return 0;
}
else
{
")");
xmlFreeDoc(info->xsp_doc);
nmem_destroy(info->nmem);
- return 0;
}
else
{
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'>: "
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'>: "