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