/* This file is part of the YAZ toolkit.
- * Copyright (C) 1995-2010 Index Data.
+ * Copyright (C) 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:
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-/** \file
+/** \file
\brief XML Include (not to be confused with W3C XInclude)
*/
#include <yaz/yconfig.h>
#include <yaz/xmltypes.h>
+#include <yaz/file_glob.h>
YAZ_BEGIN_CDECL
#if YAZ_HAVE_XML2
/** \brief substitute include nodes in a tree
- \param n node where include is peformed
+ \param n node where include is performed
\param base_path base_path - for relative file specs
\retval 0 OK
\retval -1 FAILURE
YAZ_EXPORT
int yaz_xml_include_simple(xmlNode *n, const char *base_path);
+/** \brief substitute include nodes in a tree
+ \param n node where include is performed
+ \param base_path base_path - for relative file specs
+ \param flags for yaz_file_glob2 (YAZ_FILE_GLOB_...)
+ \retval 0 OK
+ \retval -1 FAILURE
+
+ Nodes of the form <include src="glob-pattern"/> are substituted with
+ contents of files matching glob-pattern. Do not use this function
+ on XML from untrusted sources -- from the net for example -- local
+ trusted XML configuration ONLY.
+*/
+YAZ_EXPORT
+int yaz_xml_include_glob(xmlNode *n, const char *base_path, unsigned flags);
+
#endif
YAZ_END_CDECL