sdcvalidator-ts

v4.1.0
io.github.SemanticDataCharter/sdcvalidator-ts Checked 8 hours ago Published 22 days ago

Validate and recover SDC4 Governed Data Records in TypeScript, conforming to sdcvalidator.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

validate_instance

Validate an XML instance against its SDC4 XSD schema. Returns pass or fail with error counts.

ParameterTypeDescription
instance_path *stringPath to the XML instance (Governed Data Record) to validate.
schema_path *stringPath to the SDC4 data model XSD file.
reference_pathstringOptional path to a local copy of the SDC4 reference model (sdc4.xsd). Without it the model's include is fetched from its URL.

validate_and_report

Validate an XML instance and report every error: its path, its tier (structural or semantic), the constraint that failed, and the ExceptionalValue code recovery would use.

ParameterTypeDescription
instance_path *stringPath to the XML instance (Governed Data Record) to validate.
schema_path *stringPath to the SDC4 data model XSD file.
reference_pathstringOptional path to a local copy of the SDC4 reference model (sdc4.xsd). Without it the model's include is fetched from its URL.

recover_instance

Recover an XML instance: each value with a semantic error keeps its value and is tagged with an ISO 21090 ExceptionalValue. Returns the recovered record and each value covered; a record with structural errors is rejected.

ParameterTypeDescription
instance_path *stringPath to the XML instance (Governed Data Record) to validate.
schema_path *stringPath to the SDC4 data model XSD file.
reference_pathstringOptional path to a local copy of the SDC4 reference model (sdc4.xsd). Without it the model's include is fetched from its URL.

check_schema_compliance

Check whether an XSD schema follows SDC4 principles (restriction only, no xsd:extension). Does not validate instances.

ParameterTypeDescription
schema_path *stringPath to the SDC4 data model XSD file.