Further work on yaz_xml_to_opac
[yaz-moved-to-github.git] / include / yaz / marcdisp.h
index e2f9e21..3c98b5b 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of the YAZ toolkit.
- * Copyright (C) 1995-2012 Index Data.
+ * Copyright (C) 1995-2013 Index Data.
  * All rights reserved.
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:
@@ -438,6 +438,21 @@ YAZ_EXPORT void yaz_opac_decode_wrbuf(yaz_marc_t mt, Z_OPACRecord *r,
 YAZ_EXPORT void yaz_opac_decode_wrbuf2(yaz_marc_t mt, Z_OPACRecord *r,
                                        WRBUF wrbuf, yaz_iconv_t cd);
 
+#if YAZ_HAVE_XML2
+/** \brief Converts XML to OPAC
+    \param mt marc handle 
+    \param src XML root node (presumably opacRecord node)
+    \param dst Z39.50 OPAC result - allocated by NMEM on marc handle
+    \param cd iconv handle for the OPAC content (not ISO2709 part)
+    \param nmem memory for OPACRecord (if NULL, mt NMEM memory is used)
+    \retval 1 conversion OK
+    \retval 0 conversion NOT OK
+    \*/
+YAZ_EXPORT int yaz_xml_to_opac(yaz_marc_t mt, xmlNode *src,
+                               Z_OPACRecord **dst, yaz_iconv_t cd,
+                               NMEM nmem);
+#endif
+
 /** \brief flushes records
     \param mt handle
     \param wr WRBUF for output