projects
/
yaz-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
retrieval: pick matched element-set rule YAZ-813
[yaz-moved-to-github.git]
/
src
/
record_conv.c
diff --git
a/src/record_conv.c
b/src/record_conv.c
index
1595faf
..
2fbe986
100644
(file)
--- a/
src/record_conv.c
+++ b/
src/record_conv.c
@@
-385,12
+385,10
@@
static int convert_select(void *vinfo, WRBUF record, WRBUF wr_error)
for (i = 0; i < nodes->nodeNr; i++)
{
xmlNode *ptr = nodes->nodeTab[i];
for (i = 0; i < nodes->nodeNr; i++)
{
xmlNode *ptr = nodes->nodeTab[i];
- fprintf(stderr, "xpath result %d type=%d\n", i,
- ptr->type);
if (ptr->type == XML_ELEMENT_NODE)
ptr = ptr->children;
if (ptr->type == XML_ELEMENT_NODE)
ptr = ptr->children;
- if (ptr->type == XML_TEXT_NODE)
- for (; ptr; ptr = ptr->next)
+ for (; ptr; ptr = ptr->next)
+ if (ptr->type == XML_TEXT_NODE)
wrbuf_puts(record, (const char *) ptr->content);
}
}
wrbuf_puts(record, (const char *) ptr->content);
}
}
@@
-403,8
+401,12
@@
static int convert_select(void *vinfo, WRBUF record, WRBUF wr_error)
return ret;
}
return ret;
}
-static void destroy_select(void *info)
+static void destroy_select(void *vinfo)
{
{
+ struct select_info *info = vinfo;
+
+ if (info)
+ nmem_destroy(info->nmem);
}
}