The cstutilxmlvalidate
macro validates the structure and syntax of an XML file against the
XML schema associated with the XML file. It can be run at any time.
Note: This macro replaces the standard-specific
macros crtdds_xmlvalidate.sas, ct_xmlvalidate.sas, and odm_xmlvalidate.sas.
These macros are deprecated and will be deleted in SAS Clinical Standards
Toolkit 1.7. It is recommended that you replace calls to these macros
with a call to the cstutilxmlvalidate macro.
The SAS Clinical Standards
Toolkit includes a call to the cstutilxmlvalidate macro immediately
following a call to create a specific XML file (for example, the define_write
macro to create a CDISC Define-XML 2.0 file). This is typically the
last step of the sample driver program (for example, create_definexml.sas).
If you customize the XML file after it is generated, this macro can
be used to validate the customizations. The SAS Clinical Standards
Toolkit includes a call to the cstutilxmlvalidate macro immediately
before a call to read a specific XML file (for example, the crtdds_read
macro to read a CDISC CRT-DDS 1.0 file) from the associated sample
driver program (for example, create_sascrtdds_fromxml.sas).
Here is an example of
a call to the cstutilxmlvalidate macro:
%cstutilxmlvalidate(_cstSASReferences=work.sasreferences,_cstLogLevel=info);
In this example, the
cstutilxmlvalidate macro is being submitted with a log level of Info.
Note: For more information about
the cstutilxmlvalidate macro, see the
SAS Clinical Data
Standards Toolkit: Macro API Documentation.
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 the cstutilxmlvalidate Macro
|
|
|
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 CRT-DDS document or with the
execution of the validation process.
|
|
Messages that indicate
that something in the define.xml document is invalid with respect
to the normal XML schema for CRT-DDS. 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 that you choose determines what other messages are generated.
For example, if you choose the Warning level, then all Warning messages
and anything more severe, such as Error and Fatal error messages,
are generated. If you choose the Error level, then only Error and
Fatal Error messages are generated.