1 /* This file is part of the Zebra server.
2 Copyright (C) Index Data
4 Zebra is free software; you can redistribute it and/or modify it under
5 the terms of the GNU General Public License as published by the Free
6 Software Foundation; either version 2, or (at your option) any later
9 Zebra is distributed in the hope that it will be useful, but WITHOUT ANY
10 WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
23 #include "../api/testlib.h"
25 /** xpath3.c - attributes, with Danish characters */
27 const char *myrec[] = {
29 " <!-- Space in attribute --> \n"
30 " <first attr=\"danish\">content</first> \n"
31 " <second attr=\"danish lake\">content</second> \n"
32 " <!-- Oslash in Latin-1 encoded below.. --> \n"
33 " <third attr=\"dansk s\xf8\">content</third> \n"
38 static void tst(int argc, char **argv)
40 ZebraService zs = tl_start_up(0, argc, argv);
41 ZebraHandle zh = zebra_open(zs, 0);
42 YAZ_CHECK(tl_init_data(zh, myrec));
44 YAZ_CHECK(tl_query(zh, "@attr 1=/root content",1));
45 YAZ_CHECK(tl_query(zh, "@attr 1=/root/first content",1));
46 YAZ_CHECK(tl_query(zh, "@attr {1=/root/first[@attr='danish']} content",1));
47 YAZ_CHECK(tl_query(zh, "@attr {1=/root/second[@attr='danish lake']} content",1));
48 YAZ_CHECK(tl_query(zh, "@attr {1=/root/third[@attr='dansk s\xc3\xb8']} content",1));
49 /* FIXME - This triggers bug200 */
51 YAZ_CHECK(tl_close_down(zh, zs));
58 * c-file-style: "Stroustrup"
59 * indent-tabs-mode: nil
61 * vim: shiftwidth=4 tabstop=8 expandtab