Changed behavior of yaz_retrieval_request so that no rules, i.e. no
[yaz-moved-to-github.git] / src / retrieval.c
index 3ca6d8d..d86b928 100644 (file)
@@ -2,7 +2,7 @@
  * Copyright (C) 2005-2006, Index Data ApS
  * See the file LICENSE for details.
  *
- * $Id: retrieval.c,v 1.4 2006-05-07 17:45:41 adam Exp $
+ * $Id: retrieval.c,v 1.6 2006-05-08 11:58:37 adam Exp $
  */
 /**
  * \file retrieval.c
 #include <yaz/tpath.h>
 #include <yaz/proto.h>
 
-#if HAVE_XSLT
+#if HAVE_XML2
 #include <libxml/parser.h>
 #include <libxml/tree.h>
 #include <libxml/xinclude.h>
-#include <libxslt/xsltutils.h>
-#include <libxslt/transform.h>
 
 /** \brief The internal structure for yaz_retrieval_t */
 struct yaz_retrieval_struct {
@@ -241,9 +239,11 @@ int yaz_retrieval_request(yaz_retrieval_t p,
                           int **backend_syntax)
 {
     struct yaz_retrieval_elem *el = p->list;
-
     int syntax_matches = 0;
     int schema_matches = 0;
+
+    if (!el)
+        return 0;
     for(; el; el = el->next)
     {
         int schema_ok = 0;