Base class for schema validators.
More...
#include <libxml++/validators/schemavalidatorbase.h>
|
| SchemaValidatorBase () noexcept |
|
| ~SchemaValidatorBase () override |
|
virtual | operator bool () const noexcept override=0 |
| Test whether a schema has been parsed.
|
|
virtual void | parse_document (const Document * document)=0 |
| Parse a schema definition from a document.
|
|
void | parse_file (const std::string & filename) override=0 |
| Parse a schema definition file.
|
|
void | parse_memory (const Glib::ustring & contents) override=0 |
| Parse a schema definition from a string.
|
|
void | validate (const Document * document) override=0 |
| Validate a document, using a previously parsed schema.
|
|
virtual void | validate (const std::string & filename)=0 |
| Validate an XML file, using a previously parsed schema.
|
|
| Validator () noexcept |
|
| ~Validator () override |
|
Base class for schema validators.
- Since libxml++ 2.38
◆ SchemaValidatorBase()
xmlpp::SchemaValidatorBase::SchemaValidatorBase |
( |
| ) |
|
|
noexcept |
◆ ~SchemaValidatorBase()
xmlpp::SchemaValidatorBase::~SchemaValidatorBase |
( |
| ) |
|
|
override |
◆ initialize_context()
void xmlpp::SchemaValidatorBase::initialize_context |
( |
| ) |
|
|
overrideprotectedvirtual |
◆ operator bool()
virtual xmlpp::SchemaValidatorBase::operator bool |
( |
| ) |
const |
|
explicitoverridepure virtualnoexcept |
◆ parse_document()
virtual void xmlpp::SchemaValidatorBase::parse_document |
( |
const Document * | document | ) |
|
|
pure virtual |
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).
- Parameters
-
document | A preparsed document tree, containing the schema definition. |
- Exceptions
-
Implemented in xmlpp::RelaxNGValidator, and xmlpp::XsdValidator.
◆ parse_file()
void xmlpp::SchemaValidatorBase::parse_file |
( |
const std::string & | filename | ) |
|
|
overridepure virtual |
Parse a schema definition file.
If the validator already contains a schema, that schema is released (deleted if the validator owns the schema).
- Parameters
-
filename | The URL of the schema. |
- Exceptions
-
Implements xmlpp::Validator.
Implemented in xmlpp::RelaxNGValidator, and xmlpp::XsdValidator.
◆ parse_memory()
void xmlpp::SchemaValidatorBase::parse_memory |
( |
const Glib::ustring & | contents | ) |
|
|
overridepure virtual |
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).
- Parameters
-
contents | The schema definition as a string. |
- Exceptions
-
Implements xmlpp::Validator.
Implemented in xmlpp::RelaxNGValidator, and xmlpp::XsdValidator.
◆ release_underlying()
void xmlpp::SchemaValidatorBase::release_underlying |
( |
| ) |
|
|
overrideprotectedvirtual |
◆ validate() [1/2]
void xmlpp::SchemaValidatorBase::validate |
( |
const Document * | document | ) |
|
|
overridepure virtual |
◆ validate() [2/2]
virtual void xmlpp::SchemaValidatorBase::validate |
( |
const std::string & | filename | ) |
|
|
pure virtual |