Enabled XInclude for XSLT stylesheets
This commit is contained in:
parent
5bba36e949
commit
ffb00a00a0
@ -3,6 +3,7 @@
|
||||
#include <libxml/parser.h>
|
||||
#include <libxml/xpath.h>
|
||||
#include <libxml/tree.h>
|
||||
#include <libxml/xinclude.h>
|
||||
#include <libxslt/xsltInternals.h>
|
||||
#include <libxslt/transform.h>
|
||||
#include <swe-glib.h>
|
||||
@ -862,6 +863,12 @@ ag_chart_create_svg(AgChart *chart, GError **err)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#if LIBXML_VERSION >= 20603
|
||||
xmlXIncludeProcessFlags(xslt_doc, XSLT_PARSE_OPTIONS);
|
||||
#else
|
||||
xmlXIncludeProcess(xslt_doc);
|
||||
#endif
|
||||
|
||||
if ((xslt_proc = xsltParseStylesheetDoc(xslt_doc)) == NULL) {
|
||||
g_set_error(err, AG_CHART_ERROR, AG_CHART_ERROR_CORRUPT_FILE, "File '%s' can not be parsed as a stylesheet file.", stylesheet_path);
|
||||
g_free(stylesheet_path);
|
||||
|
@ -5,6 +5,7 @@
|
||||
#include <libxml/xmlversion.h>
|
||||
#include <libxml/parser.h>
|
||||
#include <libxslt/xslt.h>
|
||||
#include <libxslt/transform.h>
|
||||
#include <libexslt/exslt.h>
|
||||
|
||||
#include <libgd/gd.h>
|
||||
@ -94,6 +95,7 @@ main(int argc, char *argv[])
|
||||
xmlSubstituteEntitiesDefault(1);
|
||||
xmlLoadExtDtdDefaultValue = 1;
|
||||
xsltInit();
|
||||
xsltSetXIncludeDefault(1);
|
||||
exsltRegisterAll();
|
||||
gswe_init();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user