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
Merge branch 'master' into sru_2_0
[yaz-moved-to-github.git]
/
src
/
xml_match.c
diff --git
a/src/xml_match.c
b/src/xml_match.c
index
ab0e4b1
..
dd804db
100644
(file)
--- a/
src/xml_match.c
+++ b/
src/xml_match.c
@@
-10,13
+10,8
@@
#include <config.h>
#endif
#include <config.h>
#endif
-#include <stdlib.h>
-
#include <yaz/srw.h>
#include <yaz/srw.h>
-#include <yaz/wrbuf.h>
#if YAZ_HAVE_XML2
#if YAZ_HAVE_XML2
-#include <libxml/parser.h>
-#include <libxml/tree.h>
#include "sru-p.h"
int yaz_match_xsd_element(xmlNodePtr ptr, const char *elem)
#include "sru-p.h"
int yaz_match_xsd_element(xmlNodePtr ptr, const char *elem)
@@
-30,8
+25,8
@@
int yaz_match_xsd_element(xmlNodePtr ptr, const char *elem)
#define CHECK_TYPE 0
#define CHECK_TYPE 0
-int yaz_match_xsd_string_n(xmlNodePtr ptr, const char *elem, ODR o,
- char **val, int *len)
+int yaz_match_xsd_string_n_nmem(xmlNodePtr ptr, const char *elem, NMEM nmem,
+ char **val, int *len)
{
#if CHECK_TYPE
struct _xmlAttr *attr;
{
#if CHECK_TYPE
struct _xmlAttr *attr;
@@
-60,12
+55,17
@@
int yaz_match_xsd_string_n(xmlNodePtr ptr, const char *elem, ODR o,
*val = "";
return 1;
}
*val = "";
return 1;
}
- *val = odr_strdup(o, (const char *) ptr->content);
+ *val = nmem_strdup(nmem, (const char *) ptr->content);
if (len)
*len = xmlStrlen(ptr->content);
return 1;
}
if (len)
*len = xmlStrlen(ptr->content);
return 1;
}
+int yaz_match_xsd_string_n(xmlNodePtr ptr, const char *elem, ODR o,
+ char **val, int *len)
+{
+ return yaz_match_xsd_string_n_nmem(ptr, elem, o->mem, val, len);
+}
int yaz_match_xsd_string(xmlNodePtr ptr, const char *elem, ODR o, char **val)
{
int yaz_match_xsd_string(xmlNodePtr ptr, const char *elem, ODR o, char **val)
{