libxml++: xmlpp::SchemaValidatorBase Class Reference

libxml++ 2.38.1

- Main Page
- Related Pages
- Namespaces
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Types | Public Member Functions | Protected Member Functions | List of all members
xmlpp::SchemaValidatorBase Class Referenceabstract

Base class for schema validators. More...

`#include <libxml++/validators/schemavalidatorbase.h>`

Inheritance diagram for xmlpp::SchemaValidatorBase:
[legend]

## Public Types
typedef const void* | BoolExpr
| This typedef is just to make it more obvious that our operator const void* should be used like operator bool(). More...

## Public Member Functions
| SchemaValidatorBase ()
virtual | ~SchemaValidatorBase ()
virtual | operator BoolExpr () const =0
| Test whether a schema has been parsed. More...
virtual void | parse_document (const Document* document)=0
| Parse a schema definition from a document. More...
virtual void | parse_file (const Glib::ustring& filename)=0
| Parse a schema definition file. More...
virtual void | parse_memory (const Glib::ustring& contents)=0
| Parse a schema definition from a string. More...
virtual void | validate (const Document* document)=0
| Validate a document, using a previously parsed schema. More...
virtual void | validate (const Glib::ustring& filename)=0
| Validate an XML file, using a previously parsed schema. More...
Public Member Functions inherited from xmlpp::Validator
| Validator ()
virtual | ~Validator ()

## Protected Member Functions
virtual void | initialize_valid ()
virtual void | release_underlying ()
Protected Member Functions inherited from xmlpp::Validator
virtual void | check_for_exception ()
virtual void | check_for_validity_messages ()
virtual void | handleException (const exception& e)
virtual void | on_validity_error (const Glib::ustring& message)
virtual void | on_validity_warning (const Glib::ustring& message)

## Additional Inherited Members
Static Protected Member Functions inherited from xmlpp::Validator
static void | callback_validity_error (void* ctx, const char* msg,...)
static void | callback_validity_warning (void* ctx, const char* msg,...)
Protected Attributes inherited from xmlpp::Validator
exception* | exception_
_xmlValidCtxt* | valid_
Glib::ustring | validate_error_
Glib::ustring | validate_warning_

## Detailed Description

Base class for schema validators.

Since libxml++ 2.38:

## Member Typedef Documentation

typedef const void* xmlpp::SchemaValidatorBase::BoolExpr

This typedef is just to make it more obvious that our operator const void* should be used like operator bool().

## Constructor & Destructor Documentation

xmlpp::SchemaValidatorBase::SchemaValidatorBase | ( |  | ) |

virtual xmlpp::SchemaValidatorBase::~SchemaValidatorBase | ( |  | ) |
| virtual

## Member Function Documentation

virtual void xmlpp::SchemaValidatorBase::initialize_valid | ( |  | ) |
| protectedvirtual

Reimplemented from xmlpp::Validator.

Reimplemented in xmlpp::RelaxNGValidator, and xmlpp::XsdValidator.

virtual xmlpp::SchemaValidatorBase::operator BoolExpr | ( |  | ) | const
| pure virtual

Test whether a schema has been parsed.

For instance

if (validator)
do_something();

Implemented in xmlpp::RelaxNGValidator, and xmlpp::XsdValidator.

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

  xmlpp::parse_error |

Implemented in xmlpp::RelaxNGValidator, and xmlpp::XsdValidator.

virtual void xmlpp::SchemaValidatorBase::parse_file | ( | const Glib::ustring & | filename | ) |
| pure 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

  xmlpp::parse_error |

Implemented in xmlpp::RelaxNGValidator, and xmlpp::XsdValidator.

virtual void xmlpp::SchemaValidatorBase::parse_memory | ( | const Glib::ustring & | contents | ) |
| pure 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

  xmlpp::parse_error |

Implemented in xmlpp::RelaxNGValidator, and xmlpp::XsdValidator.

virtual void xmlpp::SchemaValidatorBase::release_underlying | ( |  | ) |
| protectedvirtual

Reimplemented from xmlpp::Validator.

Reimplemented in xmlpp::RelaxNGValidator, and xmlpp::XsdValidator.

virtual void xmlpp::SchemaValidatorBase::validate | ( | const Document* | document | ) |
| pure virtual

Validate a document, using a previously parsed schema.

Parameters

  document | Pointer to the document.

Exceptions

  xmlpp::internal_error |
  xmlpp::validity_error |

Implemented in xmlpp::RelaxNGValidator, and xmlpp::XsdValidator.

virtual void xmlpp::SchemaValidatorBase::validate | ( | const Glib::ustring & | filename | ) |
| pure virtual

Validate an XML file, using a previously parsed schema.

Parameters

  filename | The URL of the XML file.

Exceptions

  xmlpp::internal_error |
  xmlpp::parse_error |
  xmlpp::validity_error |

Implemented in xmlpp::RelaxNGValidator, and xmlpp::XsdValidator.