X-Git-Url: http://git.indexdata.com/?p=idzebra-moved-to-github.git;a=blobdiff_plain;f=data1%2Fd1_utils.c;h=69db13f7506c7876a50c02b742284415447176ec;hp=b714d87000d0bcc8bb8e2337dfe0c8c1e7fe0931;hb=aeea139423b8eaf28a4de53b3d7b2ad1f22284e7;hpb=0052fb5520062c328006dc3537f39d28e88f3579 diff --git a/data1/d1_utils.c b/data1/d1_utils.c index b714d87..69db13f 100644 --- a/data1/d1_utils.c +++ b/data1/d1_utils.c @@ -37,20 +37,20 @@ void data1_remove_node (data1_handle dh, data1_node *n) /* n is the only child */ if(! n->next){ - n->parent->last_child = 0; + n->parent->last_child = 0; } - } + } /* n is one of the following childrens */ else { data1_node * before; - + /* need to find sibling before me */ before = n->parent->child; while (before->next != n) before = before->next; - + before->next = n->next; - + /* n is last child of many */ if ( n->parent->last_child == n){ n->parent->last_child = before; @@ -74,16 +74,16 @@ void data1_remove_idzebra_subtree (data1_handle dh, data1_node *n) if (!strcmp(n->u.tag.tag, "idzebra")){ if (n->u.tag.attributes){ data1_xattr *xattr = n->u.tag.attributes; - + for (; xattr; xattr = xattr->next){ - if (!strcmp(xattr->name, "xmlns") - & !strcmp(xattr->value, + if (!strcmp(xattr->name, "xmlns") + & !strcmp(xattr->value, "http://www.indexdata.dk/zebra/")) data1_remove_node (dh, n); } } } - + break; /* case DATA1N_data: @@ -110,7 +110,7 @@ void data1_remove_idzebra_subtree (data1_handle dh, data1_node *n) n->parent->last_child, n); } */ - + }