1 /* This file is part of the Zebra server.
2 Copyright (C) 1994-2011 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
20 #include "../api/testlib.h"
22 /** xpath3.c - attributes, with Danish characters */
24 const char *myrec[] = {
26 " <!-- Space in attribute --> \n"
27 " <first attr=\"danish\">content</first> \n"
28 " <second attr=\"danish lake\">content</second> \n"
29 " <!-- Oslash in Latin-1 encoded below.. --> \n"
30 " <third attr=\"dansk sø\">content<third> \n"
35 static void tst(int argc, char **argv)
37 ZebraService zs = tl_start_up(0, argc, argv);
38 ZebraHandle zh = zebra_open(zs, 0);
39 YAZ_CHECK(tl_init_data(zh, myrec));
41 YAZ_CHECK(tl_query(zh, "@attr 1=/root content",1));
42 YAZ_CHECK(tl_query(zh, "@attr 1=/root/first content",1));
43 YAZ_CHECK(tl_query(zh, "@attr {1=/root/first[@attr='danish']} content",1));
44 YAZ_CHECK(tl_query(zh, "@attr {1=/root/second[@attr='danish lake']} content",1));
45 YAZ_CHECK(tl_query(zh, "@attr {1=/root/third[@attr='dansk s\xc3\xb8']} content",1));
46 /* FIXME - This triggers bug200 */
48 YAZ_CHECK(tl_close_down(zh, zs));
55 * c-file-style: "Stroustrup"
56 * indent-tabs-mode: nil
58 * vim: shiftwidth=4 tabstop=8 expandtab