From f73803ab6d95254ef6685d23e5d4944597d1f0c0 Mon Sep 17 00:00:00 2001 From: "Zane U. Ji" Date: Wed, 6 Nov 2013 19:43:04 +0800 Subject: [PATCH] Fixed "DTD not found" problem --- src/wraplibxml.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/wraplibxml.cpp b/src/wraplibxml.cpp index 24dfd73..e3d32b6 100644 --- a/src/wraplibxml.cpp +++ b/src/wraplibxml.cpp @@ -42,6 +42,7 @@ public: LIBXML_TEST_VERSION xmlInitializeCatalog(); + xmlLoadCatalog ( catalogPath.mb_str() ); ::catalog = xmlLoadACatalog ( catalogPath.mb_str() ); initGenericErrorDefaultFunc ( NULL ); @@ -579,14 +580,16 @@ wxString WrapLibxml::catalogResolve char *s = ( char * ) xmlACatalogResolve ( ::catalog, ( const xmlChar * ) ( const char *) publicId.utf8_str(), ( const xmlChar * ) ( const char *) systemId.utf8_str() ); -#ifndef __WXMSW__ if ( s == NULL ) + { +#ifndef __WXMSW__ s = ( char * ) xmlCatalogResolve ( ( const xmlChar * ) ( const char *) publicId.utf8_str(), ( const xmlChar * ) ( const char *) systemId.utf8_str() ); + if ( s == NULL ) #endif - if ( s == NULL ) - return wxEmptyString; + return wxEmptyString; + } wxString url ( s, wxConvUTF8 ); xmlFree ( s );