summaryrefslogtreecommitdiffstats
path: root/kxsldbg
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2022-10-13 01:55:18 +0200
committerSlávek Banko <slavek.banko@axis.cz>2022-10-13 01:55:18 +0200
commitf4859ad13cd26b31e44d981bd0d55a9fa19c7aab (patch)
tree1a3232e62b26a4759483a07417bcbe0b704defe6 /kxsldbg
parentaecfb2bff4ca6ce3624fb7c6f913511ef7a2cdbc (diff)
downloadtdewebdev-f4859ad13cd26b31e44d981bd0d55a9fa19c7aab.tar.gz
tdewebdev-f4859ad13cd26b31e44d981bd0d55a9fa19c7aab.zip
Remove code to support libxml2 < 2.6.
Enable LIBXML_DOCB_ENABLED independently of the presence of 'libxml/DOCBparser.h' because from libxml2 >= 2.6 for docbook files are not used deprecated functions from DOCBparser, so 'libxml/DOCBparser.h' is not needed. Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'kxsldbg')
-rw-r--r--kxsldbg/kxsldbgpart/libxsldbg/files.cpp3
-rw-r--r--kxsldbg/kxsldbgpart/libxsldbg/xsldbg.cpp25
2 files changed, 1 insertions, 27 deletions
diff --git a/kxsldbg/kxsldbgpart/libxsldbg/files.cpp b/kxsldbg/kxsldbgpart/libxsldbg/files.cpp
index 73d3713b..3a7c6add 100644
--- a/kxsldbg/kxsldbgpart/libxsldbg/files.cpp
+++ b/kxsldbg/kxsldbgpart/libxsldbg/files.cpp
@@ -743,9 +743,6 @@ filesInit(void)
tempDocument = NULL;
topStylesheet = NULL;
entityNameList = arrayListNew(4, (freeItemFunc) filesFreeEntityInfo);
-#if defined(HAVE_INCLUDE_FIX) && (LIBXML_VERSION < 20508)
- xmlSetEntityReferenceFunc(filesEntityRef);
-#endif
/* setup the encoding */
encodeInBuff = xmlBufferCreate();
diff --git a/kxsldbg/kxsldbgpart/libxsldbg/xsldbg.cpp b/kxsldbg/kxsldbgpart/libxsldbg/xsldbg.cpp
index 08de69d7..a3d01cab 100644
--- a/kxsldbg/kxsldbgpart/libxsldbg/xsldbg.cpp
+++ b/kxsldbg/kxsldbgpart/libxsldbg/xsldbg.cpp
@@ -82,9 +82,6 @@
#include <libxml/xmlerror.h>
#include <libxml/HTMLtree.h>
#include <libxml/xmlIO.h>
-#ifdef LIBXML_DOCB_ENABLED
-#include <libxml/DOCBparser.h>
-#endif
#ifdef LIBXML_XINCLUDE_ENABLED
#include <libxml/xinclude.h>
#endif
@@ -975,22 +972,11 @@ xsldbgLoadXmlData(void)
#endif
#ifdef LIBXML_DOCB_ENABLED
if (optionsGetIntOption(OPTIONS_DOCBOOK))
-# if LIBXML_VERSION >= 20600
doc = xmlParseFile((char *) optionsGetStringOption(OPTIONS_DATA_FILE_NAME));
-# else
- doc = docbParseFile((char *)
- optionsGetStringOption(OPTIONS_DATA_FILE_NAME),
- NULL);
-# endif
else
#endif
-
-#if LIBXML_VERSION >= 20600
doc = xmlSAXParseFile(&mySAXHandler,
(char *) optionsGetStringOption(OPTIONS_DATA_FILE_NAME), 0);
-#else
- doc = xmlParseFile((char *) optionsGetStringOption(OPTIONS_DATA_FILE_NAME));
-#endif
if (doc == NULL) {
xsldbgGenericErrorFunc(i18n("Error: Unable to parse file %1.\n").arg(xsldbgUrl(optionsGetStringOption(OPTIONS_DATA_FILE_NAME))));
if (!optionsGetIntOption(OPTIONS_SHELL)) {
@@ -1031,11 +1017,7 @@ xsldbgLoadXmlTemporary(const xmlChar * path)
#endif
#ifdef LIBXML_DOCB_ENABLED
if (optionsGetIntOption(OPTIONS_DOCBOOK))
-# if LIBXML_VERSION >= 20600
doc = xmlParseFile((char *) path);
-# else
- doc = docbParseFile((char *) path, NULL);
-# endif
else
#endif
doc = xmlSAXParseFile(&mySAXhdlr, (char *) path, 0);
@@ -1100,7 +1082,7 @@ handler_routine(DWORD dwCtrlType)
#endif
-#if LIBXML_VERSION >= 2006000
+#if 0
/* libxml/ handlers */
void xsldbgStructErrorHandler(void * userData, xmlErrorPtr error)
{
@@ -1230,16 +1212,11 @@ xsldbgInit()
/* set up the parser */
xmlInitParser();
#if 0
-#if LIBXML_VERSION >= 20600
xmlSetGenericErrorFunc(NULL, NULL);
xmlSetStructuredErrorFunc(NULL , (xmlStructuredErrorFunc)xsldbgStructErrorHandler);
#else
xmlSetGenericErrorFunc(0, xsldbgGenericErrorFunc);
xsltSetGenericErrorFunc(0, xsldbgGenericErrorFunc);
-#endif
-#else
- xmlSetGenericErrorFunc(0, xsldbgGenericErrorFunc);
- xsltSetGenericErrorFunc(0, xsldbgGenericErrorFunc);
#endif
/*