-## Copyright (C) 1994-2004, Index Data
+## Copyright (C) 1994-2006, Index Data
## All rights reserved.
-## $Id: Makefile.am,v 1.10 2005-11-02 13:32:58 adam Exp $
+## $Id: Makefile.am,v 1.11 2006-01-27 17:33:15 adam Exp $
check_PROGRAMS = tsticonv tstnmem tstmatchstr tstwrbuf tstodr tstccl tstlog \
- tstsoap1 tstsoap2 tstodrstack tstlogthread
+ tstsoap1 tstsoap2 tstodrstack tstlogthread tstxmlquery
check_SCRIPTS = tstcql.sh tstmarc.sh
TESTS = $(check_PROGRAMS) $(check_SCRIPTS)
LDADD = ../src/libyaz.la
tsticonv_SOURCES = tsticonv.c
-
tstnmem_SOURCES = tstnmem.c
-
tstmatchstr_SOURCES = tstmatchstr.c
-
tstwrbuf_SOURCES = tstwrbuf.c
-
tstodr_SOURCES = tstodrcodec.c tstodrcodec.h tstodr.c
-
tstodrstack_SOURCES = tstodrstack.c
-
tstccl_SOURCES = tstccl.c
-
tstlog_SOURCES = tstlog.c
-
tstsoap1_SOURCES = tstsoap1.c
-
tstsoap2_SOURCES = tstsoap2.c
-
tstlogthread_SOURCES = tstlogthread.c
+tstxmlquery_SOURCES = tstxmlquery.c
--- /dev/null
+/*
+ * Copyright (C) 1995-2005, Index Data ApS
+ * See the file LICENSE for details.
+ *
+ * $Id: tstxmlquery.c,v 1.1 2006-01-27 17:33:15 adam Exp $
+ */
+
+#include <stdlib.h>
+#include <stdio.h>
+
+#include <yaz/wrbuf.h>
+#include <yaz/xmlquery.h>
+#include <yaz/pquery.h>
+#include <yaz/test.h>
+
+#if HAVE_XML2
+static void pqf2xml_text(const char *pqf)
+{
+ YAZ_PQF_Parser parser = yaz_pqf_create();
+ ODR odr = odr_createmem(ODR_ENCODE);
+ Z_RPNQuery *rpn;
+
+ YAZ_CHECK(parser);
+
+ YAZ_CHECK(odr);
+
+ rpn = yaz_pqf_parse(parser, odr, pqf);
+
+ YAZ_CHECK(rpn);
+
+ yaz_pqf_destroy(parser);
+
+ Z_Query *query = odr_malloc(odr, sizeof(*query));
+ query->which = Z_Query_type_1;
+ query->u.type_1 = rpn;
+
+ odr_destroy(odr);
+}
+#endif
+
+int main (int argc, char **argv)
+{
+ pqf2xml_text("@attr 1=4 computer");
+
+ exit(0);
+ return 0;
+}
+
+/*
+ * Local variables:
+ * c-basic-offset: 4
+ * indent-tabs-mode: nil
+ * End:
+ * vim: shiftwidth=4 tabstop=8 expandtab
+ */
+