X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Frecord_conv.c;h=8c00ebb88a97fed9e7bc3d14139f01356f9e7c23;hb=34841706b5b43761ba4a3f3c6b0fd667b775654e;hp=2a60f21c1b2e5adebf019eb898215bd2d4f10673;hpb=76b209145568a179bb21a8d43db003ffe605b6d5;p=yaz-moved-to-github.git diff --git a/src/record_conv.c b/src/record_conv.c index 2a60f21..8c00ebb 100644 --- a/src/record_conv.c +++ b/src/record_conv.c @@ -2,7 +2,7 @@ * Copyright (C) 2005-2006, Index Data ApS * See the file LICENSE for details. * - * $Id: record_conv.c,v 1.4 2006-05-04 20:00:45 adam Exp $ + * $Id: record_conv.c,v 1.6 2006-05-07 17:45:41 adam Exp $ */ /** * \file record_conv.c @@ -145,7 +145,7 @@ static int conv_xslt(yaz_record_conv_t p, const xmlNode *ptr) stylesheet = (const char *) attr->children->content; else { - wrbuf_printf(p->wr_error, "Bad attribute '%s'." + wrbuf_printf(p->wr_error, "Bad attribute '%s'" "Expected stylesheet.", attr->name); return -1; } @@ -210,7 +210,7 @@ static int conv_marc(yaz_record_conv_t p, const xmlNode *ptr) output_format = (const char *) attr->children->content; else { - wrbuf_printf(p->wr_error, "Bad attribute '%s'.", attr->name); + wrbuf_printf(p->wr_error, "Bad attribute '%s'", attr->name); return -1; } } @@ -323,7 +323,7 @@ int yaz_record_conv_configure(yaz_record_conv_t p, const void *ptr_v) else { wrbuf_printf(p->wr_error, "Bad element '%s'." - "Expected marc, xslt, ..", ptr->name); + "Expected marc, xslt, ..", ptr->name); return -1; } } @@ -336,7 +336,9 @@ int yaz_record_conv_configure(yaz_record_conv_t p, const void *ptr_v) return 0; } -int yaz_record_conv_record(yaz_record_conv_t p, const char *input_record, +int yaz_record_conv_record(yaz_record_conv_t p, + const char *input_record_buf, + size_t input_record_len, WRBUF output_record) { int ret = 0; @@ -344,7 +346,7 @@ int yaz_record_conv_record(yaz_record_conv_t p, const char *input_record, struct yaz_record_conv_rule *r = p->rules; wrbuf_rewind(p->wr_error); - wrbuf_puts(record, input_record); + wrbuf_write(record, input_record_buf, input_record_len); for (; ret == 0 && r; r = r->next) { if (r->which == YAZ_RECORD_CONV_RULE_XSLT)