XML schema based validation of XML representations of SCAP documents. More...
Typedefs | |
typedef enum oscap_document_type | oscap_document_type_t |
SCAP document type identifiers. | |
Enumerations | |
enum | oscap_document_type { OSCAP_DOCUMENT_OVAL_DEFINITIONS = 1, OSCAP_DOCUMENT_OVAL_SYSCHAR, OSCAP_DOCUMENT_OVAL_RESULTS, OSCAP_DOCUMENT_XCCDF, OSCAP_DOCUMENT_CPE_LANGUAGE, OSCAP_DOCUMENT_CPE_DICTIONARY } |
SCAP document type identifiers. More... | |
Functions | |
bool | oscap_validate_document (const char *xmlfile, oscap_document_type_t doctype, const char *version, oscap_reporter reporter, void *arg) |
Validate a SCAP document file against a XML schema. |
XML schema based validation of XML representations of SCAP documents.
enum oscap_document_type |
SCAP document type identifiers.
bool oscap_validate_document | ( | const char * | xmlfile, | |
oscap_document_type_t | doctype, | |||
const char * | version, | |||
oscap_reporter | reporter, | |||
void * | arg | |||
) |
Validate a SCAP document file against a XML schema.
Schemas are searched relative to path specified by the OSCAP_SCHEMA_PATH environment variable, which contains a list of colon-separated paths. If the variable does not exist a default path is used (usually something like $PREFIX/share/openscap/schemas).
Directory structure must adhere $SCHEMA_PATH/$STANDARD/$VERSION/$SCHEMAFILE.xsd structure, where $STANDARD is oval, xccdf, etc., and $VERSION is a version of the standard.
xmlfile | File to be validated. | |
doctype | Document type represented by the file. | |
version | Version of the document, use NULL for library's default. | |
reporetr | A reporter to by notified of encountered issues. Can be NULL, if a binary document validates / does not validate answer is satisfactonary. | |
arg | Argument for the reporter. |