Represents a RelaxNG schema for validating XML files.
More...
#include <libxml++/relaxngschema.h>
Represents a RelaxNG schema for validating XML files.
RelaxNG = REgular LAnguage for XML Next Generation
- Since libxml++ 2.38:
◆ RelaxNGSchema() [1/4]
xmlpp::RelaxNGSchema::RelaxNGSchema |
( |
| ) |
|
◆ RelaxNGSchema() [2/4]
xmlpp::RelaxNGSchema::RelaxNGSchema |
( |
_xmlRelaxNG * |
schema | ) |
|
|
explicit |
Create a schema from the underlying libxml schema element.
- Parameters
-
schema | A pointer to the libxml schema element. The RelaxNGSchema takes ownership of the _xmlRelaxNG. The caller must not deallocate it. |
◆ RelaxNGSchema() [3/4]
xmlpp::RelaxNGSchema::RelaxNGSchema |
( |
const std::string & |
filename | ) |
|
|
explicit |
Create a schema from a schema definition file.
The schema must be defined with XML syntax (.rng file). The compact syntax (.rnc file) is not supported.
- Parameters
-
filename | The URL of the schema. |
- Exceptions
-
◆ RelaxNGSchema() [4/4]
xmlpp::RelaxNGSchema::RelaxNGSchema |
( |
const Document * |
document | ) |
|
|
explicit |
Create a schema from an XML document.
- Parameters
-
document | A preparsed document tree, containing the schema definition. |
- Exceptions
-
◆ ~RelaxNGSchema()
xmlpp::RelaxNGSchema::~RelaxNGSchema |
( |
| ) |
|
|
override |
◆ cobj() [1/2]
const _xmlRelaxNG* xmlpp::RelaxNGSchema::cobj |
( |
| ) |
const |
|
noexcept |
Access the underlying libxml implementation.
◆ cobj() [2/2]
_xmlRelaxNG* xmlpp::RelaxNGSchema::cobj |
( |
| ) |
|
|
noexcept |
Access the underlying libxml implementation.
◆ parse_context()
void xmlpp::RelaxNGSchema::parse_context |
( |
_xmlRelaxNGParserCtxt * |
context | ) |
|
|
protected |
◆ parse_document()
void xmlpp::RelaxNGSchema::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
-
document | A preparsed document tree, containing the schema definition. |
- Exceptions
-
Implements xmlpp::SchemaBase.
◆ parse_file()
void xmlpp::RelaxNGSchema::parse_file |
( |
const std::string & |
filename | ) |
|
|
overridevirtual |
Parse a schema definition file.
The schema must be defined with XML syntax (.rng file). The compact syntax (.rnc file) is not supported.
If another schema has been parsed before, that schema is replaced by the new one.
- Parameters
-
filename | The URL of the schema. |
- Exceptions
-
Implements xmlpp::SchemaBase.
◆ parse_memory()
void xmlpp::RelaxNGSchema::parse_memory |
( |
const ustring & |
contents | ) |
|
|
overridevirtual |
Parse a schema definition from a string.
The schema must be defined with XML syntax. The compact syntax is not supported.
If another schema has been parsed before, that schema is replaced by the new one.
- Parameters
-
contents | The schema definition as a string. |
- Exceptions
-
Implements xmlpp::SchemaBase.
◆ release_underlying()
void xmlpp::RelaxNGSchema::release_underlying |
( |
| ) |
|
|
protected |