Make sure this compiles even without Libxml2.
[yaz-moved-to-github.git] / test / tstxmlquery.c
index c72343e..68a86b5 100644 (file)
@@ -2,7 +2,7 @@
  * 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 $
+ * $Id: tstxmlquery.c,v 1.3 2006-01-27 19:04:15 adam Exp $
  */
 
 #include <stdlib.h>
@@ -13,7 +13,6 @@
 #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();
@@ -35,11 +34,15 @@ static void pqf2xml_text(const char *pqf)
     query->u.type_1 = rpn;
 
     odr_destroy(odr);
-}
+#if HAVE_XML2
+
 #endif
+}
 
 int main (int argc, char **argv)
 {
+    YAZ_CHECK_INIT(argc, argv);
+
     pqf2xml_text("@attr 1=4 computer");
 
     exit(0);