Note: The process for validating
ODM XML files is the same for all ODM versions that are supported
by the SAS Clinical Standards Toolkit. The process is explained using
ODM version 1.3.0.
When an ODM XML is created
using the create_odmxml driver (and the odm_write macro), the structure
and syntax of the XML file are validated against the XML schema for
the ODM standard. The results of this validation are written to the
Results data set. Here is a sample of the validation results.
Example of Schema Validation Reported in a CDISC ODM Results
Data Set
XML schema validation
results are logged using four log level settings. These log levels
refer to the XML-generated log, not the log that is generated by SAS.
Log Levels for Schema Validation
|
|
|
Messages such as the
system properties of the current Java environment and progress messages.
This is the default value.
|
|
Messages that indicate
that there might be an issue with the ODM document or with the execution
of the validation process.
|
Error
|
Messages that indicate
that something in the ODM document is invalid with respect to the
normal XML schema for ODM. Or, a non-fatal error has occurred during
processing.
|
|
Messages that indicate
that the XML document could not be processed at all. There are many
causes, including, file system access errors, incorrect file paths,
and malformed XML.
|
Each message that is
generated during XML validation is associated with one of these levels.
The level specified determines what other messages are generated.
For example, if the Warning level is specified, then all Warning messages
and anything more severe, such as Error and Fatal Error messages,
are generated. In the SAS Clinical Standards Toolkit, the Log Level
is set to Info by default when using the create_odmxml driver (and
the odm_write macro).
It is also possible
to use the odm_xmlvalidate macro to validate the structure and syntax
of an ODM XML file against the XML schema for the ODM standard. It
can be run at any time. The SAS Clinical Standards Toolkit includes
a call to the odm_xmlvalidate macro immediately following the call
to the odm_write macro as the last step of the create_odmxml.sas sample
driver program. If you customize the ODM XML file after it is generated,
then this macro can be used to validate the changes. The SAS Clinical
Standards Toolkit also includes a call to the odm_xmlvalidate macro
immediately before the call to the odm_read macro in the create_sasodm_fromxml.sas
sample driver program.
Here is an example of
a call to the odm_xmlvalidate macro:
%odm_xmlvalidate(_cstLogLevel=info,_cstResultsOverrideDS=work.xmlvalidate);
In this example, the
odm_xmlvalidate macro is being submitted with a log level of Info.
The Results data set is named XMLVALIDATE and resides in the Work
library.