XML Include: do not substitute root node
authorAdam Dickmeiss <adam@indexdata.dk>
Fri, 22 Jan 2010 22:02:46 +0000 (23:02 +0100)
committerAdam Dickmeiss <adam@indexdata.dk>
Fri, 22 Jan 2010 22:04:16 +0000 (23:04 +0100)
Do not substitute root node .. The node parameter is simply xmlNode*
- not xmlNode **.

src/xml_include.c

index db5f13e..add66d9 100644 (file)
@@ -133,7 +133,7 @@ static int config_include_src(yaz_xml_include_t config, xmlNode **np,
 
 static int process_config_includes(yaz_xml_include_t config, xmlNode *n)
 {
-    for (; n; n = n->next)
+    for (n = n->children; n; n = n->next)
     {
         if (n->type == XML_ELEMENT_NODE)
         {
@@ -152,7 +152,7 @@ static int process_config_includes(yaz_xml_include_t config, xmlNode *n)
             }
             else
             {
-                if (process_config_includes(config, n->children))
+                if (process_config_includes(config, n))
                     return -1;
             }
         }