projects
/
yaz-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c78f611
)
record_render: make it compile wo Libxml2
author
Adam Dickmeiss
<adam@indexdata.dk>
Mon, 18 Jun 2012 13:47:01 +0000
(15:47 +0200)
committer
Adam Dickmeiss
<adam@indexdata.dk>
Mon, 18 Jun 2012 13:47:01 +0000
(15:47 +0200)
src/record_render.c
patch
|
blob
|
history
diff --git
a/src/record_render.c
b/src/record_render.c
index
291462b
..
ba5311e
100644
(file)
--- a/
src/record_render.c
+++ b/
src/record_render.c
@@
-22,8
+22,10
@@
#include <yaz/nmem_xml.h>
#include <yaz/base64.h>
#include <yaz/nmem_xml.h>
#include <yaz/base64.h>
+#if YAZ_HAVE_XML2
#include <libxml/xpath.h>
#include <libxml/xpathInternals.h>
#include <libxml/xpath.h>
#include <libxml/xpathInternals.h>
+#endif
static yaz_iconv_t iconv_create_charset(const char *record_charset,
yaz_iconv_t *cd2)
static yaz_iconv_t iconv_create_charset(const char *record_charset,
yaz_iconv_t *cd2)
@@
-227,6
+229,7
@@
static const char *get_record_format(WRBUF wrbuf, int *len,
return res;
}
return res;
}
+#if YAZ_HAVE_XML2
static int replace_node(NMEM nmem, xmlNode *ptr,
const char *type_spec, char *record_buf)
{
static int replace_node(NMEM nmem, xmlNode *ptr,
const char *type_spec, char *record_buf)
{
@@
-267,11
+270,13
@@
static int replace_node(NMEM nmem, xmlNode *ptr,
odr_destroy(odr);
return ret;
}
odr_destroy(odr);
return ret;
}
+#endif
static const char *base64_render(NMEM nmem, WRBUF wrbuf,
const char *buf, int *len,
const char *expr, const char *type_spec)
{
static const char *base64_render(NMEM nmem, WRBUF wrbuf,
const char *buf, int *len,
const char *expr, const char *type_spec)
{
+#if YAZ_HAVE_XML2
xmlDocPtr doc = xmlParseMemory(buf, *len);
if (doc)
{
xmlDocPtr doc = xmlParseMemory(buf, *len);
if (doc)
{
@@
-326,6
+331,7
@@
static const char *base64_render(NMEM nmem, WRBUF wrbuf,
xmlFreeDoc(doc);
xmlFree(buf_out);
}
xmlFreeDoc(doc);
xmlFree(buf_out);
}
+#endif
return buf;
}
return buf;
}