dcc-validate¶
Validation tool to check a DCC file complies to all rules of its XSD schema file.
dcc-validate [-h] [-v VERSION] [--ignore-cache] DCC_FILE
Arguments¶
DCC_FILE¶
Positional argument that points to the local path where the DCC file is stored. This argument is always required.
-v, --version <xsd_version>¶
Used schema version to define the DCC rules. If not specified, the input file is then scanned to find out which version is specified in it.
Specifying the version also allows any DCC to be compared with other releases, displaying then the main differences.
Example
dcc-validate .\v3.4.0-rc.2\dynamics_sineCalibration.xml
No errors found.
dcc-validate .\v3.4.0-rc.2\dynamics_sineCalibration.xml -v 3.3.0
The file "examples\data\v3.4.0-rc.2\dynamics_sineCalibration.xml" contains the following errors:
—> '3.4.0-rc.2' value doesn't match any pattern of ['3\\.3\\.0']
—> '{'tableDimension': '1'}' 'tableDimension' attribute not allowed for element
—> '{'refType': 'vib_frequency vib_nominalFrequency', 'index': '0'}' 'index' attribute not allowed for element
Tip
The comparison of DCCs among different versions can be helpful to understand the differences or to check whether a file can be easily migrated among versions.
--ignore-cache¶
Flag argument to specify whether to work with the cache files or with the latest published files. Only when the argument is provided at the call, the algorithm will search for the online published files, ignoring any cache file. If the argument is not provided and there is no existing cache, a cache for the
Note
Each publish file if stored at a URL https://ptb.de/dcc/v{VERSION}/dcc.xsd, e.g.: https://ptb.de/dcc/v3.3.0/dcc.xsd.