- for (XMLSize_t i=0; i<mappings->getLength(); i++) {
- root=static_cast<DOMElement*>(mappings->item(i));
- const XMLCh* from=root->getAttributeNS(nullptr,systemId);
- const XMLCh* to=root->getAttributeNS(nullptr,uri);
- m_schemaLocMap[from]=to;
+ for (XMLSize_t i = 0; i < mappings->getLength(); i++) {
+ root = static_cast<DOMElement*>(mappings->item(i));
+ const XMLCh* from = root->getAttributeNS(nullptr,systemId);
+ const XMLCh* to = root->getAttributeNS(nullptr,uri);
+
+ // Roundtrip to local code page and back to translate path as needed.
+ auto_ptr_char temp(to);
+ string topath(temp.get());
+ XMLToolingConfig::getConfig().getPathResolver()->resolve(topath, PathResolver::XMLTOOLING_XML_FILE);
+ auto_ptr_XMLCh temp2(topath.c_str());
+
+ m_schemaLocMap[from] = temp2.get();