diff options
author | Abdullah Sowayan <sowayan@users.noreply.github.com> | 2007-03-18 22:23:37 +0000 |
---|---|---|
committer | Abdullah Sowayan <sowayan@users.noreply.github.com> | 2007-03-18 22:23:37 +0000 |
commit | 06a34455bd98b1379cc69bbc5b2cf085e0fc0d9b (patch) | |
tree | 8815ce3b3a85c3c4285429295f338e00ea4497f4 /CIAO/tools/Config_Handlers/Utils/XML_Schema_Resolver.h | |
parent | d66fcc9b4aaec8e88eeb83fc578fdf8a3cc963de (diff) | |
download | ATCD-Static_RT_DAnCE.tar.gz |
Diffstat (limited to 'CIAO/tools/Config_Handlers/Utils/XML_Schema_Resolver.h')
-rw-r--r-- | CIAO/tools/Config_Handlers/Utils/XML_Schema_Resolver.h | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/CIAO/tools/Config_Handlers/Utils/XML_Schema_Resolver.h b/CIAO/tools/Config_Handlers/Utils/XML_Schema_Resolver.h new file mode 100644 index 00000000000..f4573fe20cc --- /dev/null +++ b/CIAO/tools/Config_Handlers/Utils/XML_Schema_Resolver.h @@ -0,0 +1,66 @@ +/** + * @file XML_Schema_Resolver.h + * @author Will Otte <wotte@dre.vanderbilt.edu> + * + * $Id$ + * + * Resolves schema locations. + */ + +#ifndef CIAO_CONFIG_HANDLERS_XML_SCHEAM_RESOLVER_H +#define CIAO_CONFIG_HANDLERS_XML_SCHEAM_RESOLVER_H +#include /**/ "ace/pre.h" + +#include "CIAO_XML_Utils_Export.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +#pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include <xercesc/dom/DOMEntityResolver.hpp> +#include <xercesc/dom/DOMInputSource.hpp> + +#include <string> + +using xercesc::DOMEntityResolver; +using xercesc::DOMInputSource; + +namespace CIAO +{ + namespace Config_Handlers + { + /** + * @class CIAO_Schema_Resolver + * @brief Resolves schema locations for CIAO. + */ + class CIAO_Schema_Resolver + : public virtual DOMEntityResolver + { + public: + /// This constructor locates the schema in the default location + /// from CIAO_ROOT/docs/schema. + CIAO_Schema_Resolver (void); + + /// If this constructor is passed a nonempty string, it locates + /// the schema in that path, otherwise its behavior is the same + /// as the default constructor. + CIAO_Schema_Resolver (const char *path); + + /// This function is called by the Xerces infrastructure to + /// actually resolve the location of a schema. + virtual DOMInputSource * resolveEntity (const XMLCh *const publicId, + const XMLCh *const systemId, + const XMLCh *const baseURI); + + private: + std::string resolve_from_environment (void); + + std::string base_path_; + }; + } +} + + +#include /**/ "ace/post.h" + +#endif /* CIAO_CONFIG_HANDLERS_XML_SCHEAM_RESOLVER_H */ |