Log XML2/XSLT errors to yaz_log
[idzebra-moved-to-github.git] / data1 / d1_grs.c
index 1b9ea1d..a99e0a0 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of the Zebra server.
-   Copyright (C) 1994-2011 Index Data
+   Copyright (C) 2004-2013 Index Data
 
 Zebra is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
@@ -19,6 +19,9 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 /* converts data1 tree to GRS-1 record */
 
+#if HAVE_CONFIG_H
+#include <config.h>
+#endif
 #include <assert.h>
 #include <stdlib.h>
 
@@ -104,7 +107,7 @@ static int traverse_triples(data1_node *n, int level, Z_ElementMetaData *m,
     ODR o)
 {
     data1_node *c;
-    
+
     for (c = n->child; c; c = c->next)
        if (c->which == DATA1N_data && level)
        {
@@ -232,7 +235,7 @@ static int is_empty_data (data1_node *n)
                                || n->u.data.what == DATA1I_xmltext))
     {
         int i = n->u.data.len;
-        
+
         while (i > 0 && d1_isspace(n->u.data.data[i-1]))
             i--;
         if (i == 0)
@@ -303,9 +306,9 @@ static Z_TaggedElement *nodetotaggedelement(data1_handle dh, data1_node *n,
     {
        char *tagstr;
 
-       if (n->which == DATA1N_tag)      
+       if (n->which == DATA1N_tag)
            tagstr = n->u.tag.tag;       /* tag at node */
-       else if (tag)                    
+       else if (tag)
            tagstr = tag->value.string;  /* no take from well-known */
        else
             return 0;