X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=include%2Fyaz%2Fxml_include.h;h=c0f689dc943a0d4aaa32d638c0a68ccfad5fbc46;hp=2b708c058291ef4de4fa25ee1518df6d5dc40c21;hb=5ef30a0bda9a010b88266f90a253a2c46e6d47db;hpb=419e0de8e395a9b43263d669eb83dc5bef0734a0;ds=sidebyside diff --git a/include/yaz/xml_include.h b/include/yaz/xml_include.h index 2b708c0..c0f689d 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-2010 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: @@ -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