#include <XMLValidator.hpp>
Public Member Functions | |
Getters | |
openstudio::path | schemaPath () const |
bool | validate (const openstudio::path &xmlPath) |
bool | isValid () const |
boost::optional< openstudio::path > | xmlPath () const |
std::vector< LogMessage > | errors () const |
std::vector< LogMessage > | warnings () const |
std::vector< LogMessage > | logMessages () const |
boost::optional< std::string > | fullValidationReport () const |
Only applicable for Schematron validation. More... | |
Static Public Member Functions | |
Other | |
static openstudio::path | schematronToXslt (const openstudio::path &schemaPath, const openstudio::path &outputDir) |
Static helper to convert a Schematron file to an XSLT StyleSheet. More... | |
Constructors | |
XMLValidator (const openstudio::path &schemaPath) | |
Constructor for a new validator. More... | |
~XMLValidator () | |
XMLValidator (const XMLValidator &other)=default | |
XMLValidator (XMLValidator &&other) noexcept=default | |
XMLValidator & | operator= (const XMLValidator &other)=default |
XMLValidator & | operator= (XMLValidator &&other) noexcept=default |
static XMLValidator | gbxmlValidator () |
|
explicit |
Constructor for a new validator.
The schemaPath extension is used to determine the type of validation to perform:
*.xsd
=> XSD*.xml
or *.sct
=> Schematron (convert to XSLT then validate)*.xslt
=> Schematron that is already transformed to an XSLT stylesheet openstudio::XMLValidator::~XMLValidator | ( | ) |
|
default |
|
defaultnoexcept |
std::vector<LogMessage> openstudio::XMLValidator::errors | ( | ) | const |
boost::optional<std::string> openstudio::XMLValidator::fullValidationReport | ( | ) | const |
Only applicable for Schematron validation.
|
static |
bool openstudio::XMLValidator::isValid | ( | ) | const |
std::vector<LogMessage> openstudio::XMLValidator::logMessages | ( | ) | const |
|
default |
|
defaultnoexcept |
openstudio::path openstudio::XMLValidator::schemaPath | ( | ) | const |
|
static |
Static helper to convert a Schematron file to an XSLT StyleSheet.
bool openstudio::XMLValidator::validate | ( | const openstudio::path & | xmlPath | ) |
std::vector<LogMessage> openstudio::XMLValidator::warnings | ( | ) | const |
boost::optional<openstudio::path> openstudio::XMLValidator::xmlPath | ( | ) | const |