1 /* $Id: xslt5.c,v 1.1 2006-11-10 13:10:31 adam Exp $
2 Copyright (C) 1995-2006
5 This file is part of the Zebra server.
7 Zebra is free software; you can redistribute it and/or modify it under
8 the terms of the GNU General Public License as published by the Free
9 Software Foundation; either version 2, or (at your option) any later
12 Zebra is distributed in the hope that it will be useful, but WITHOUT ANY
13 WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
26 static void tst(int argc, char **argv)
29 char profile_path[256];
30 char record_buf[20000];
34 ZebraService zs = tl_start_up(0, argc, argv);
35 ZebraHandle zh = zebra_open(zs, 0);
37 tl_check_filter(zs, "alvis");
39 YAZ_CHECK(zebra_select_database(zh, "Default") == ZEBRA_OK);
43 sprintf(profile_path, "%s:%s/../../tab",
44 tl_get_srcdir(), tl_get_srcdir());
45 zebra_set_resource(zh, "profilePath", profile_path);
47 zebra_set_resource(zh, "recordType", "alvis.marcschema-one.xml");
49 sprintf(path, "%.200s/marc-missing-ns.xml", tl_get_srcdir());
50 f = fopen(path, "rb");
54 r = fread(record_buf, 1, sizeof(record_buf)-1, f);
59 YAZ_CHECK_EQ(zebra_add_record(zh, record_buf, strlen(record_buf)),
62 YAZ_CHECK(tl_close_down(zh, zs));
70 * indent-tabs-mode: nil
72 * vim: shiftwidth=4 tabstop=8 expandtab