libxml++ 2.42.1
Public Member Functions | Protected Member Functions | List of all members
xmlpp::XsdSchema Class Reference

Represents an XSD schema for validating XML files. More...

#include <libxml++/xsdschema.h>

Inheritance diagram for xmlpp::XsdSchema:
Inheritance graph
[legend]

Public Member Functions

LIBXMLPP_API XsdSchema ()
 
LIBXMLPP_API XsdSchema (_xmlSchema * schema)
 Create a schema from the underlying libxml schema element.
 
LIBXMLPP_API XsdSchema (const Document * document)
 Create a schema from an XML document.
 
LIBXMLPP_API XsdSchema (const Glib::ustring & filename)
 Create a schema from a schema definition file.
 
LIBXMLPP_API ~XsdSchema () override
 
LIBXMLPP_API _xmlSchema * cobj ()
 Access the underlying libxml implementation.
 
LIBXMLPP_API const _xmlSchema * cobj () const
 Access the underlying libxml implementation.
 
LIBXMLPP_API void parse_document (const Document * document) override
 Parse a schema definition from a document.
 
LIBXMLPP_API void parse_file (const Glib::ustring & filename) override
 Parse a schema definition file.
 
LIBXMLPP_API void parse_memory (const Glib::ustring & contents) override
 Parse a schema definition from a string.
 
- Public Member Functions inherited from xmlpp::SchemaBase
 SchemaBase ()
 
 ~SchemaBase () override
 
virtual void parse_document (const Document * document)=0
 Parse a schema definition from a document.
 
virtual void parse_file (const Glib::ustring & filename)=0
 Parse a schema definition file.
 
virtual void parse_memory (const Glib::ustring & contents)=0
 Parse a schema definition from a string.
 

Protected Member Functions

LIBXMLPP_API void parse_context (_xmlSchemaParserCtxt * context)
 
LIBXMLPP_API void release_underlying ()
 

Detailed Description

Represents an XSD schema for validating XML files.

XSD = XML Schema Definition, a.k.a. XML Schema or W3C XML Schema

Since libxml++ 2.38:

Constructor & Destructor Documentation

◆ XsdSchema() [1/4]

LIBXMLPP_API xmlpp::XsdSchema::XsdSchema ( )

◆ XsdSchema() [2/4]

LIBXMLPP_API xmlpp::XsdSchema::XsdSchema ( _xmlSchema *  schema)
explicit

Create a schema from the underlying libxml schema element.

Parameters
schemaA pointer to the libxml schema element. The XsdSchema takes ownership of the _xmlSchema. The caller must not deallocate it.

◆ XsdSchema() [3/4]

LIBXMLPP_API xmlpp::XsdSchema::XsdSchema ( const Glib::ustring filename)
explicit

Create a schema from a schema definition file.

Parameters
filenameThe URL of the schema.
Exceptions
xmlpp::parse_error

◆ XsdSchema() [4/4]

LIBXMLPP_API xmlpp::XsdSchema::XsdSchema ( const Document document)
explicit

Create a schema from an XML document.

Parameters
documentA preparsed document tree, containing the schema definition.
Exceptions
xmlpp::parse_error

◆ ~XsdSchema()

LIBXMLPP_API xmlpp::XsdSchema::~XsdSchema ( )
override

Member Function Documentation

◆ cobj() [1/2]

LIBXMLPP_API _xmlSchema * xmlpp::XsdSchema::cobj ( )

Access the underlying libxml implementation.

◆ cobj() [2/2]

LIBXMLPP_API const _xmlSchema * xmlpp::XsdSchema::cobj ( ) const

Access the underlying libxml implementation.

◆ parse_context()

LIBXMLPP_API void xmlpp::XsdSchema::parse_context ( _xmlSchemaParserCtxt *  context)
protected

◆ parse_document()

LIBXMLPP_API void xmlpp::XsdSchema::parse_document ( const Document document)
overridevirtual

Parse a schema definition from a document.

If another schema has been parsed before, that schema is replaced by the new one.

Parameters
documentA preparsed document tree, containing the schema definition.
Exceptions
xmlpp::parse_error

Implements xmlpp::SchemaBase.

◆ parse_file()

LIBXMLPP_API void xmlpp::XsdSchema::parse_file ( const Glib::ustring filename)
overridevirtual

Parse a schema definition file.

If another schema has been parsed before, that schema is replaced by the new one.

Parameters
filenameThe URL of the schema.
Exceptions
xmlpp::parse_error

Implements xmlpp::SchemaBase.

◆ parse_memory()

LIBXMLPP_API void xmlpp::XsdSchema::parse_memory ( const Glib::ustring contents)
overridevirtual

Parse a schema definition from a string.

If another schema has been parsed before, that schema is replaced by the new one.

Parameters
contentsThe schema definition as a string.
Exceptions
xmlpp::parse_error

Implements xmlpp::SchemaBase.

◆ release_underlying()

LIBXMLPP_API void xmlpp::XsdSchema::release_underlying ( )
protected