From 412479f40059058aa24c943c2ecd099ab2131cb7 Mon Sep 17 00:00:00 2001 From: "Zane U. Ji" Date: Thu, 21 Aug 2014 22:58:40 +0800 Subject: [PATCH] Bug #212 XSLT insert elements --- src/xmlpromptgenerator.cpp | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/xmlpromptgenerator.cpp b/src/xmlpromptgenerator.cpp index 12626a8..b75520a 100644 --- a/src/xmlpromptgenerator.cpp +++ b/src/xmlpromptgenerator.cpp @@ -405,20 +405,6 @@ int XMLCALL XmlPromptGenerator::externalentityrefhandler ( XmlPromptGenerator *pThis = ( XmlPromptGenerator * ) p; PromptGeneratorData *d = pThis->d.get(); - // Either EXPAT or Xerces-C++ is capable of parsing DTDs. The advantage - // of Xerces-C++ is that it can access DTDs that are on the internet. -#if !PREFER_EXPAT_TO_XERCES_C - - return pThis->parseGrammar - ( d - , wxString::FromUTF8 ( publicId ) - , wxString::FromUTF8 ( systemId ) - , d->basePath - , Grammar::DTDGrammarType - ); - -#else // !PREFER_EXPAT_TO_XERCES_C - int ret; std::string buffer; @@ -441,6 +427,20 @@ int XMLCALL XmlPromptGenerator::externalentityrefhandler ( return ret; } + // Either EXPAT or Xerces-C++ is capable of parsing DTDs. The advantage + // of Xerces-C++ is that it can access DTDs that are on the internet. +#if !PREFER_EXPAT_TO_XERCES_C + + return pThis->parseGrammar + ( d + , wxString::FromUTF8 ( publicId ) + , wxString::FromUTF8 ( systemId ) + , d->basePath + , Grammar::DTDGrammarType + ); + +#else // !PREFER_EXPAT_TO_XERCES_C + wxString widePublicId ( publicId, wxConvUTF8 ); wxString wideSystemId ( systemId, wxConvUTF8 ); CatalogResolver cr;