X-Git-Url: http://www.project-moonshot.org/gitweb/?p=shibboleth%2Fcpp-xmltooling.git;a=blobdiff_plain;f=xmltooling%2Futil%2FParserPool.cpp;h=5e44c28fcdf665fdef7c645cc3d032ca2b987a29;hp=6a4700ded153e55e4d5aff591bbb48168133a93f;hb=fb0b932235484e41580e8e8ae7b7e36b02168414;hpb=e93ce2c962c535ff88f26427e9aeb572f83976e1 diff --git a/xmltooling/util/ParserPool.cpp b/xmltooling/util/ParserPool.cpp index 6a4700d..5e44c28 100644 --- a/xmltooling/util/ParserPool.cpp +++ b/xmltooling/util/ParserPool.cpp @@ -325,6 +325,7 @@ DOMInputSource* ParserPool::resolveEntity( #endif if (!systemId) return nullptr; + xstring sysId(systemId); Category& log=Category::getInstance(XMLTOOLING_LOGCAT".ParserPool"); if (log.isDebugEnabled()) { @@ -334,14 +335,15 @@ DOMInputSource* ParserPool::resolveEntity( } // Find well-known schemas in the specified location. - map::const_iterator i = m_schemaLocMap.find(systemId); + map::const_iterator i = m_schemaLocMap.find(sysId); if (i != m_schemaLocMap.end()) return new Wrapper4InputSource(new LocalFileInputSource(baseURI, i->second.c_str())); // Check for entity as a suffix of a value in the map. + bool (*p_ends_with)(const xstring&, const xstring&) = ends_with; i = find_if( m_schemaLocMap.begin(), m_schemaLocMap.end(), - boost::bind(ends_with, boost::bind(&map::value_type::second, _1), systemId) + boost::bind(p_ends_with, boost::bind(&map::value_type::second, _1), boost::ref(sysId)) ); if (i != m_schemaLocMap.end()) return new Wrapper4InputSource(new LocalFileInputSource(baseURI, i->second.c_str()));