X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=include%2Fyaz%2Fxml_include.h;h=788190779547c660a4ca5da5baa8bb7e732f85f7;hp=56dae799781a9cae25d58a82423312c02b275e6e;hb=30af0a1ebbea75c3e757eb03d3f988c61fce8511;hpb=43a9d38d20c1b1bcd1a03b2445a501d27526bd35 diff --git a/include/yaz/xml_include.h b/include/yaz/xml_include.h index 56dae79..7881907 100644 --- a/include/yaz/xml_include.h +++ b/include/yaz/xml_include.h @@ -1,5 +1,5 @@ /* This file is part of the YAZ toolkit. - * Copyright (C) 1995-2011 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: @@ -25,7 +25,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/** \file +/** \file \brief XML Include (not to be confused with W3C XInclude) */ @@ -34,13 +34,14 @@ #include #include +#include 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 @@ -53,6 +54,21 @@ YAZ_BEGIN_CDECL 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 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