Bump year. Change Aps->ApS
[idzebra-moved-to-github.git] / test / xpath / xpath3.c
1
2 /* $Id: xpath3.c,v 1.4 2005-01-15 19:38:40 adam Exp $
3    Copyright (C) 1995-2005
4    Index Data ApS
5
6 This file is part of the Zebra server.
7
8 Zebra is free software; you can redistribute it and/or modify it under
9 the terms of the GNU General Public License as published by the Free
10 Software Foundation; either version 2, or (at your option) any later
11 version.
12
13 Zebra is distributed in the hope that it will be useful, but WITHOUT ANY
14 WARRANTY; without even the implied warranty of MERCHANTABILITY or
15 FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
16 for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with Zebra; see the file LICENSE.zebra.  If not, write to the
20 Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
21 02111-1307, USA.
22 */
23
24 #include "../api/testlib.h"
25
26 /** xpath3.c - attributes, with Danish characters */
27
28 const char *myrec[] = {
29     "<root> \n"
30     "  <!-- Space in attribute --> \n"
31     "  <first attr=\"danish\">content</first> \n"
32     "  <second attr=\"danish lake\">content</second> \n"
33     "  <!-- Oslash in Latin-1 encoded below.. --> \n"
34     "  <third attr=\"dansk sø\">content<third> \n"
35     "</root> \n",
36     0};
37
38
39 int main(int argc, char **argv)
40 {
41     ZebraService zs = start_up(0, argc, argv);
42     ZebraHandle zh = zebra_open(zs);
43     init_data(zh, myrec);
44
45 #define q(qry,hits) do_query(__LINE__,zh,qry,hits)
46
47     q("@attr 1=/root content",1);
48     q("@attr 1=/root/first content",1);
49     q("@attr {1=/root/first[@attr='danish']} content",1);
50     q("@attr {1=/root/second[@attr='danish lake']} content",1);
51     q("@attr {1=/root/third[@attr='dansk s\xc3\xb8']} content",1); 
52     /* FIXME - This triggers bug200 */
53
54     return close_down(zh, zs, 0);
55 }