sdcvalidator-ts
v4.1.0Validate 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.
| Parameter | Type | Description |
|---|---|---|
instance_path * | string | Path to the XML instance (Governed Data Record) to validate. |
schema_path * | string | Path to the SDC4 data model XSD file. |
reference_path | string | Optional 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.
| Parameter | Type | Description |
|---|---|---|
instance_path * | string | Path to the XML instance (Governed Data Record) to validate. |
schema_path * | string | Path to the SDC4 data model XSD file. |
reference_path | string | Optional 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.
| Parameter | Type | Description |
|---|---|---|
instance_path * | string | Path to the XML instance (Governed Data Record) to validate. |
schema_path * | string | Path to the SDC4 data model XSD file. |
reference_path | string | Optional 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.
| Parameter | Type | Description |
|---|---|---|
schema_path * | string | Path to the SDC4 data model XSD file. |