diff --git a/filters/xsltfilter/export/xsltproc.cpp b/filters/xsltfilter/export/xsltproc.cpp index 3bd20408a..d252cdcd6 100644 --- a/filters/xsltfilter/export/xsltproc.cpp +++ b/filters/xsltfilter/export/xsltproc.cpp @@ -287,7 +287,11 @@ int XSLTProc::parse() * disable CDATA from being built in the document tree */ xmlDefaultSAXHandlerInit(); +#if LIBXML_VERSION < 21300 + // In 2.13.0 this global variable was made constant and claimed that + // it "hasn't had an effect for a long time" xmlDefaultSAXHandler.cdataBlock = NULL; +#endif // LIBXML_VERSION if ((cur != NULL) && (cur->errors == 0)) { diff --git a/filters/xsltfilter/import/xsltproc.cpp b/filters/xsltfilter/import/xsltproc.cpp index 3bd20408a..d252cdcd6 100644 --- a/filters/xsltfilter/import/xsltproc.cpp +++ b/filters/xsltfilter/import/xsltproc.cpp @@ -287,7 +287,11 @@ int XSLTProc::parse() * disable CDATA from being built in the document tree */ xmlDefaultSAXHandlerInit(); +#if LIBXML_VERSION < 21300 + // In 2.13.0 this global variable was made constant and claimed that + // it "hasn't had an effect for a long time" xmlDefaultSAXHandler.cdataBlock = NULL; +#endif // LIBXML_VERSION if ((cur != NULL) && (cur->errors == 0)) {