2 * Copyright (C) 2005-2006, Index Data ApS
4 * Permission to use, copy, modify, distribute, and sell this software and
5 * its documentation, in whole or in part, for any purpose, is hereby granted,
8 * 1. This copyright and permission notice appear in all copies of the
9 * software and its documentation. Notices of copyright or attribution
10 * which appear at the beginning of any file must remain unchanged.
12 * 2. The name of Index Data or the individual authors may not be used to
13 * endorse or promote products derived from this software without specific
14 * prior written permission.
16 * THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND,
17 * EXPRESS, IMPLIED, OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
18 * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
19 * IN NO EVENT SHALL INDEX DATA BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
20 * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
21 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR
22 * NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
23 * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
26 * $Id: record_conv.h,v 1.3 2006-05-04 20:00:45 adam Exp $
30 * \brief Record Conversions Utility
33 #ifndef YAZ_RECORD_CONV_H
34 #define YAZ_RECORD_CONV_H
37 #include <yaz/wrbuf.h>
38 #include <yaz/yconfig.h>
42 /** record conversion handle */
43 typedef struct yaz_record_conv_struct *yaz_record_conv_t;
45 /** creates record handle
48 YAZ_EXPORT yaz_record_conv_t yaz_record_conv_create(void);
50 /** destroys record handle
51 \param p record conversion handle
53 YAZ_EXPORT void yaz_record_conv_destroy(yaz_record_conv_t p);
55 /** configures record conversion
56 \param p record conversion handle
57 \param node xmlNode pointer (root element of XML config)
61 On failure, use yaz_record_conv_get_error to get error string.
65 <xslt stylesheet="dc2marcxml.xsl"/>
66 <marc inputformat="xml" outputformat="marcxml" outputcharset="marc-8"/>
72 <marc inputformat="marc" outputformat="marcxml" inputcharset="marc-8"/>
73 <xslt stylesheet="marcxml2mods.xsl"/>
74 <xslt stylesheet="mods2dc.xsl"/>
81 int yaz_record_conv_configure(yaz_record_conv_t p, const void *node);
83 /** performs record conversion
84 \param p record conversion handle
85 \param input_record record to be converted (0-terminated)
86 \param output_record resultint record (WRBUF string)
90 On failure, use yaz_record_conv_get_error to get error string.
93 int yaz_record_conv_record(yaz_record_conv_t p, const char *input_record,
96 /** returns error string (for last error)
97 \param p record conversion handle
101 const char *yaz_record_conv_get_error(yaz_record_conv_t p);
104 /** set path for opening stylesheets etc.
105 \param p record conversion handle
106 \param path file path (UNIX style with : / Windows with ;)
109 void yaz_record_conv_set_path(yaz_record_conv_t p, const char *path);
117 * indent-tabs-mode: nil
119 * vim: shiftwidth=4 tabstop=8 expandtab