libxml++
5.4.0
|
Base class for XML validators. More...
#include <libxml++/validators/validator.h>
Public Member Functions | |
Validator () noexcept | |
~Validator () override | |
virtual | operator bool () const noexcept=0 |
Test whether a schema or a DTD has been parsed. More... | |
virtual void | parse_file (const std::string & filename)=0 |
Parse a schema definition file or an external subset (DTD file). More... | |
virtual void | parse_memory (const ustring & contents)=0 |
Parse a schema definition or a DTD from a string. More... | |
virtual void | validate (const Document * document)=0 |
Validate a document, using a previously parsed schema or DTD. More... | |
Public Member Functions inherited from xmlpp::NonCopyable | |
NonCopyable (const NonCopyable &)=delete | |
NonCopyable (NonCopyable &&)=delete | |
NonCopyable & | operator= (const NonCopyable &)=delete |
NonCopyable & | operator= (NonCopyable &&)=delete |
Protected Member Functions | |
virtual void | check_for_exception () |
virtual void | check_for_validity_messages () |
virtual void | handle_exception () |
To be called in an exception handler. More... | |
virtual void | initialize_context () |
virtual void | on_validity_error (const ustring & message) |
virtual void | on_validity_warning (const ustring & message) |
virtual void | release_underlying () |
Protected Member Functions inherited from xmlpp::NonCopyable | |
NonCopyable () noexcept | |
virtual | ~NonCopyable () |
Static Protected Member Functions | |
static void | callback_error_or_warning (bool error, void * ctx, const char * msg, va_list var_args) |
static void | callback_validity_error (void * ctx, const char * msg,...) |
static void | callback_validity_warning (void * ctx, const char * msg,...) |
static ValidatorCallbackCFuncType | get_callback_validity_error_cfunc () |
static ValidatorCallbackCFuncType | get_callback_validity_warning_cfunc () |
Protected Attributes | |
std::unique_ptr< exception > | exception_ |
ustring | validate_error_ |
ustring | validate_warning_ |
Base class for XML validators.
|
noexcept |
|
override |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
protectedvirtual |
|
protectedvirtual |
|
staticprotected |
|
staticprotected |
|
protectedvirtual |
To be called in an exception handler.
|
protectedvirtual |
Reimplemented in xmlpp::XsdValidator, xmlpp::SchemaValidatorBase, xmlpp::RelaxNGValidator, and xmlpp::DtdValidator.
|
protectedvirtual |
|
protectedvirtual |
|
explicitpure virtualnoexcept |
Test whether a schema or a DTD has been parsed.
For instance
Implemented in xmlpp::SchemaValidatorBase, xmlpp::XsdValidator, xmlpp::RelaxNGValidator, and xmlpp::DtdValidator.
|
pure virtual |
Parse a schema definition file or an external subset (DTD file).
filename | The URL of the schema or the DTD. |
xmlpp::parse_error |
Implemented in xmlpp::SchemaValidatorBase, xmlpp::XsdValidator, xmlpp::RelaxNGValidator, and xmlpp::DtdValidator.
|
pure virtual |
Parse a schema definition or a DTD from a string.
contents | The schema definition or the DTD as a string. |
xmlpp::parse_error |
Implemented in xmlpp::SchemaValidatorBase, xmlpp::XsdValidator, xmlpp::RelaxNGValidator, and xmlpp::DtdValidator.
|
protectedvirtual |
Reimplemented in xmlpp::XsdValidator, xmlpp::SchemaValidatorBase, xmlpp::RelaxNGValidator, and xmlpp::DtdValidator.
|
pure virtual |
Validate a document, using a previously parsed schema or DTD.
document | Pointer to the document. |
xmlpp::internal_error | |
xmlpp::validity_error |
Implemented in xmlpp::SchemaValidatorBase, xmlpp::XsdValidator, xmlpp::RelaxNGValidator, and xmlpp::DtdValidator.
|
protected |
|
protected |
|
protected |