File size: 372 Bytes
a8f4b72 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | import { validateSchematronXml } from './validator/schematron-validator.js';
export class SchematronEngine {
constructor(private readonly schemaXml: string) {}
validate(xml: string): string[] {
try {
return validateSchematronXml(xml, this.schemaXml);
} catch (error) {
return [error instanceof Error ? error.message : String(error)];
}
}
}
|