XMLCh * Basic_Resolver::operator() (const XMLCh *const, const XMLCh *const systemId) const { XStr path (path_); path.append (systemId); return path.release (); }
InputSource * Basic_Resolver <CHAR>::operator() (const XMLCh *const publicId, const XMLCh *const systemId) const { XStr path (path_); path.append (systemId); return new xercesc::LocalFileInputSource (path); }
void Environment_Resolver::add_path (const ACE_TCHAR *variable, const ACE_TCHAR *relpath) { ACE_Env_Value <const ACE_TCHAR *> path_env (variable, ACE_TEXT("")); XStr xpath (path_env); XStr xrelpath (relpath); xpath.append (xrelpath); paths_.push_back (xpath); }
bool operator () (T item) { if (item.empty ()) return false; XStr path (item.c_str ()); path.append (this->systemId_); FileHandle file (XMLPlatformUtils::openFile (path)); bool retval = 0 != file ? true : false; if (retval) XMLPlatformUtils::closeFile (file); return retval; }
InputSource * Path_Resolver <CHAR>::operator() (const XMLCh *const, const XMLCh *const systemId) const { typename path_type::const_iterator iter = std::find_if (this->paths_.begin (), this->paths_.end (), Path_Resolver_Functor (systemId)); if (iter != this->paths_.end ()) { XStr path (iter->c_str ()); path.append (systemId); return new xercesc::LocalFileInputSource (path); } return 0; }
XMLCh * Environment_Resolver::operator() (const XMLCh *const, const XMLCh *const systemId) const { for (std::vector<XStr>::const_iterator i = this->paths_.begin (); i != this->paths_.end (); ++i) { XStr path (*i); path.append(systemId); FileHandle file (XMLPlatformUtils::openFile (path)); if (file != 0) { XMLPlatformUtils::closeFile (file); return path.release (); } } return 0; }