* Copyright (C) 1995-2007, Index Data ApS
* See the file LICENSE for details.
*
- * $Id: marcdisp.c,v 1.45 2007-01-22 09:21:16 adam Exp $
+ * $Id: marcdisp.c,v 1.46 2007-02-17 10:53:05 adam Exp $
*/
/**
{
if (mt->write_using_libxml2)
{
+#if YAZ_HAVE_XML2
int ret;
xmlNode *root_ptr;
xmlFreeDoc(doc);
}
return ret;
+#else
+ return -1;
+#endif
}
else
return yaz_marc_write_marcxml_ns1(mt, wr, ns, format, type);
#!/bin/sh
-# $Id: tstmarcxml.sh,v 1.4 2006-12-15 19:28:47 adam Exp $
+# $Id: tstmarcxml.sh,v 1.5 2007-02-17 10:53:05 adam Exp $
# Tests reading of MARCXML and checks that we get identical ISO2709 output.
#
# Reads marc?.xml files , Generates marc?.xml.marc files
srcdir=${srcdir:-.}
ecode=0
# Skip this test if Libxml2 support is not enabled
-../util/yaz-marcdump -x >/dev/null 2>&1
+../util/yaz-marcdump -i marcxml >/dev/null 2>&1
if test $? = "3"; then
exit 0
fi
* Copyright (C) 1995-2007, Index Data ApS
* See the file LICENSE for details.
*
- * $Id: marcdump.c,v 1.47 2007-01-03 08:42:16 adam Exp $
+ * $Id: marcdump.c,v 1.48 2007-02-17 10:53:06 adam Exp $
*/
#define _FILE_OFFSET_BITS 64
fprintf(stderr, "%s: bad input format: %s\n", prog, arg);
exit(1);
}
+#if YAZ_HAVE_XML2
+#else
+ if (input_format == YAZ_MARC_MARCXML
+ || input_format == YAZ_MARC_XCHANGE)
+ {
+ fprintf(stderr, "%s: Libxml2 support not enabled\n", prog);
+ exit(3);
+ }
+#endif
break;
case 'o':
/* dirty hack so we can make Libxml2 do the writing ..