/usr/include/libxml++-2.6/libxml++/validators/schemavalidator.h is in libxml++2.6-dev 2.40.1-2.
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 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 | /* schemavalidator.h
* libxml++ and this file are copyright (C) 2000 by Ari Johnson,
* (C) 2002-2004 by the libxml dev team and
* are covered by the GNU Lesser General Public License, which should be
* included with libxml++ as the file COPYING.
*/
#ifndef __LIBXMLPP_VALIDATOR_SCHEMAVALIDATOR_H
#define __LIBXMLPP_VALIDATOR_SCHEMAVALIDATOR_H
#include <libxml++/validators/validator.h>
#include <libxml++/schema.h>
#include <libxml++/document.h>
#ifndef LIBXMLXX_DISABLE_DEPRECATED
#ifndef DOXYGEN_SHOULD_SKIP_THIS
extern "C" {
struct _xmlSchemaParserCtxt;
struct _xmlSchemaValidCtxt;
}
#endif //DOXYGEN_SHOULD_SKIP_THIS
namespace xmlpp {
/** XML Schema Validator.
*
* @newin{2,24}
*
* @deprecated Use XsdValidator instead.
*/
class SchemaValidator : public Validator
{
public:
SchemaValidator();
/** Create a validator and parse a schema definition file immediately.
* @param file The URL of the schema.
* @throws xmlpp::parse_error
* @deprecated Use XsdValidator instead.
*/
explicit SchemaValidator(const Glib::ustring& file);
/** Create a validator and parse a schema definition document immediately.
* @param document A preparsed document tree, containing the schema definition.
* @note The document may be modified during the parsing process.
* @throws xmlpp::parse_error
* @deprecated Use XsdValidator instead.
*/
explicit SchemaValidator(Document& document);
/** Create a schema validator.
* @param schema A pointer to the XML schema to use when validating XML documents.
* The validator does not take ownership of the schema. The caller must
* guarantee that the schema exists as long as the validator keeps a
* pointer to it. The caller is responsible for deleting the schema
* when it's no longer needed.
* @deprecated Use XsdValidator instead.
*/
explicit SchemaValidator(Schema* schema);
~SchemaValidator() override;
//TODO: Remove virtuals when we can break ABI,
//or really put these in the base class.
/** Parse a schema definition file.
* If the validator already contains a schema, that schema is released
* (deleted if the validator owns the schema).
* @param filename The URL of the schema.
* @throws xmlpp::parse_error
* @deprecated Use XsdValidator::parse_file() instead.
*/
virtual void parse_file(const Glib::ustring& filename);
/** Parse a schema definition from a string.
* If the validator already contains a schema, that schema is released
* (deleted if the validator owns the schema).
* @param contents The schema definition as a string.
* @throws xmlpp::parse_error
* @deprecated Use XsdValidator::parse_memory() instead.
*/
virtual void parse_memory(const Glib::ustring& contents);
/** Parse a schema definition from a document.
* If the validator already contains a schema, that schema is released
* (deleted if the validator owns the schema).
* @param document A preparsed document tree, containing the schema definition.
* @note The document may be modified during the parsing process.
* @throws xmlpp::parse_error
* @deprecated Use XsdValidator::parse_document() instead.
*/
virtual void parse_document(Document& document);
/** Set a schema.
* If the validator already contains a schema, that schema is released
* (deleted if the validator owns the schema).
* @param schema A pointer to the XML schema to use when validating XML documents.
* The validator does not take ownership of the schema. The caller must
* guarantee that the schema exists as long as the validator keeps a
* pointer to it. The caller is responsible for deleting the schema
* when it's no longer needed.
* @deprecated Use XsdValidator::set_schema() instead.
*/
virtual void set_schema(Schema* schema);
/** Test whether a schema has been parsed.
* @deprecated Use XsdValidator::operator BoolExpr() instead.
*/
operator bool() const;
/** Get the parsed schema.
* @returns A pointer to the parsed schema, or <tt>0</tt>.
* @deprecated Use XsdValidator::get_schema() instead.
*/
Schema* get_schema();
/** Get the parsed schema.
* @returns A pointer to the parsed schema, or <tt>0</tt>.
* @deprecated Use XsdValidator::get_schema() instead.
*/
const Schema* get_schema() const;
/** Validate a document, using a previously parsed schema.
* @param doc Pointer to the document.
* @returns Whether the document is valid.
* @throws xmlpp::internal_error
* @throws xmlpp::validity_error
* @deprecated Use XsdValidator::validate(const Document*) instead.
*/
bool validate(const Document* doc);
/** Validate an XML file, using a previously parsed schema.
* @param file The URI of the XML file.
* @returns Whether the document is valid.
* @throws xmlpp::internal_error
* @throws xmlpp::validity_error
* @deprecated Use XsdValidator::validate(const Glib::ustring&) instead.
*/
bool validate(const Glib::ustring& file);
protected:
void initialize_valid() override;
void parse_context(_xmlSchemaParserCtxt* context);
void release_underlying() override;
Schema* schema_;
bool embbeded_shema_; //TODO Correct mis-spelling at the next API/ABI break.
_xmlSchemaValidCtxt* ctxt_;
};
} // namespace xmlpp
#endif // LIBXMLXX_DISABLE_DEPRECATED
#endif //__LIBXMLPP_VALIDATOR_SCHEMAVALIDATOR_H
|