-/*
- * Copyright 2001-2009 Internet2
+/**
+ * Licensed to the University Corporation for Advanced Internet
+ * Development, Inc. (UCAID) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for
+ * additional information regarding copyright ownership.
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * UCAID licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the
+ * License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
+ * either express or implied. See the License for the specific
+ * language governing permissions and limitations under the License.
*/
/**
#include <xmltooling/unicode.h>
#include <map>
+#include <memory>
#include <stack>
#include <string>
#include <istream>
* @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);
/**
#else
std::stack<xercesc::DOMBuilder*> m_pool;
#endif
- Mutex* m_lock;
- xercesc::SecurityManager* m_security;
+ std::auto_ptr<Mutex> m_lock;
+ std::auto_ptr<xercesc::SecurityManager> m_security;
};
/**
* @param is reference to an input stream
* @param systemId optional system identifier to attach to the stream
*/
- StreamInputSource(std::istream& is, const char* systemId=NULL);
+ StreamInputSource(std::istream& is, const char* systemId=nullptr);
/// @cond off
xercesc::BinInputStream* makeStream() const;
/// @endcond
* @param systemId optional system identifier to attach to the source
* @param cacheTag optional pointer to string used for cache management
*/
- URLInputSource(const XMLCh* url, const char* systemId=NULL, std::string* cacheTag=NULL);
+ URLInputSource(const XMLCh* url, const char* systemId=nullptr, std::string* cacheTag=nullptr);
/**
* Constructor taking a DOM element supporting the following content:
* @param systemId optional system identifier to attach to the source
* @param cacheTag optional pointer to string used for cache management
*/
- URLInputSource(const xercesc::DOMElement* e, const char* systemId=NULL, std::string* cacheTag=NULL);
+ URLInputSource(const xercesc::DOMElement* e, const char* systemId=nullptr, std::string* cacheTag=nullptr);
/// @cond off
virtual xercesc::BinInputStream* makeStream() const;