From ffb00a00a055038ede6dbbfbd134d90437914f64 Mon Sep 17 00:00:00 2001 From: "Gergely POLONKAI (W00d5t0ck)" Date: Fri, 20 Sep 2013 09:58:31 +0200 Subject: [PATCH] Enabled XInclude for XSLT stylesheets --- src/ag-chart.c | 7 +++++++ src/astrognome.c | 2 ++ 2 files changed, 9 insertions(+) diff --git a/src/ag-chart.c b/src/ag-chart.c index de5aef3..66b767e 100644 --- a/src/ag-chart.c +++ b/src/ag-chart.c @@ -3,6 +3,7 @@ #include #include #include +#include #include #include #include @@ -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); diff --git a/src/astrognome.c b/src/astrognome.c index 6370856..60079fd 100644 --- a/src/astrognome.c +++ b/src/astrognome.c @@ -5,6 +5,7 @@ #include #include #include +#include #include #include @@ -94,6 +95,7 @@ main(int argc, char *argv[]) xmlSubstituteEntitiesDefault(1); xmlLoadExtDtdDefaultValue = 1; xsltInit(); + xsltSetXIncludeDefault(1); exsltRegisterAll(); gswe_init();