From 2b11b3f93d73c11256e895219b89f96c148c5e66 Mon Sep 17 00:00:00 2001 From: Scott Cantor Date: Mon, 14 Nov 2011 15:01:17 +0000 Subject: [PATCH] Add ASCII loadCatalog method. --- xmltooling/util/ParserPool.cpp | 6 ++++++ xmltooling/util/ParserPool.h | 11 +++++++++++ 2 files changed, 17 insertions(+) diff --git a/xmltooling/util/ParserPool.cpp b/xmltooling/util/ParserPool.cpp index 576f3f7..72156c0 100644 --- a/xmltooling/util/ParserPool.cpp +++ b/xmltooling/util/ParserPool.cpp @@ -236,6 +236,12 @@ bool ParserPool::loadSchema(const XMLCh* nsURI, const XMLCh* pathname) return true; } +bool ParserPool::loadCatalog(const char* pathname) +{ + auto_ptr_XMLCh temp(pathname); + return loadCatalog(temp.get()); +} + bool ParserPool::loadCatalog(const XMLCh* pathname) { #if _DEBUG diff --git a/xmltooling/util/ParserPool.h b/xmltooling/util/ParserPool.h index c3067ac..8dee873 100644 --- a/xmltooling/util/ParserPool.h +++ b/xmltooling/util/ParserPool.h @@ -114,6 +114,17 @@ namespace xmltooling { * @param pathname path to a catalog file * @return true iff the catalog was successfully processed */ + bool loadCatalog(const char* pathname); + + /** + * Load an OASIS catalog file to map schema namespace URIs to filenames. + * + * This does not provide real catalog support; only the <uri> element + * is supported to map from a namespace URI to a relative path or file:// URI. + * + * @param pathname path to a catalog file + * @return true iff the catalog was successfully processed + */ bool loadCatalog(const XMLCh* pathname); /** -- 2.1.4