/usr/include/libxml++-2.6/libxml++/xsdschema.h is in libxml++2.6-dev 2.40.1-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 | /* Copyright (C) 2014 The libxml++ development team
*
* This file is part of libxml++.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __LIBXMLPP_XSDSCHEMA_H
#define __LIBXMLPP_XSDSCHEMA_H
#include <libxml++/schemabase.h>
#include <libxml++/document.h>
#include <memory> // std::auto_ptr
#ifndef DOXYGEN_SHOULD_SKIP_THIS
extern "C" {
struct _xmlSchema;
struct _xmlSchemaParserCtxt;
}
#endif //DOXYGEN_SHOULD_SKIP_THIS
namespace xmlpp
{
/** Represents an XSD schema for validating XML files.
* XSD = XML %Schema Definition, a.k.a. XML %Schema or W3C XML %Schema
*
* @newin{2,38}
*/
class XsdSchema : public SchemaBase
{
public:
XsdSchema();
/** Create a schema from the underlying libxml schema element.
* @param schema A pointer to the libxml schema element. The XsdSchema takes
* ownership of the _xmlSchema. The caller must not deallocate it.
*/
explicit XsdSchema(_xmlSchema* schema);
/** Create a schema from a schema definition file.
* @param filename The URL of the schema.
* @throws xmlpp::parse_error
*/
explicit XsdSchema(const Glib::ustring& filename);
/** Create a schema from an XML document.
* @param document A preparsed document tree, containing the schema definition.
* @throws xmlpp::parse_error
*/
explicit XsdSchema(const Document* document);
~XsdSchema() override;
/** Parse a schema definition file.
* If another schema has been parsed before, that schema is replaced by the new one.
* @param filename The URL of the schema.
* @throws xmlpp::parse_error
*/
void parse_file(const Glib::ustring& filename) override;
/** Parse a schema definition from a string.
* If another schema has been parsed before, that schema is replaced by the new one.
* @param contents The schema definition as a string.
* @throws xmlpp::parse_error
*/
void parse_memory(const Glib::ustring& contents) override;
/** Parse a schema definition from a document.
* If another schema has been parsed before, that schema is replaced by the new one.
* @param document A preparsed document tree, containing the schema definition.
* @throws xmlpp::parse_error
*/
void parse_document(const Document* document) override;
/** Access the underlying libxml implementation. */
_xmlSchema* cobj();
/** Access the underlying libxml implementation. */
const _xmlSchema* cobj() const;
protected:
void release_underlying();
void parse_context(_xmlSchemaParserCtxt* context);
private:
struct Impl;
std::auto_ptr<Impl> pimpl_;
};
} // namespace xmlpp
#endif //__LIBXMLPP_XSDSCHEMA_H
|