Client-side Angular app for validating Peppol and EHF XML documents against the Schematron files in Schemas/.
Schemas/ is the source of truth. Schemas/registry.json explicitly defines which source package, document type, identifiers, and .sch stack apply to each profile.
npm install
npm run prepare:runtime
npm startRun npm run prepare:runtime whenever you change files in Schemas/ or Schemas/registry.json.
npm start now just serves the Angular app and uses the committed runtime assets already in public/runtime/.
Schemas/*.schcontains the standalone Peppol source filesSchemas/ehf-postaward-g3/contains the imported EHF package filesSchemas/registry.jsondecides which package and which single-file or multi-file Schematron stack is used for a given document profile
The app does not guess validation stacks from filenames anymore. If a profile needs multiple Schematron layers, list them in order in Schemas/registry.json.
public/runtime/schema-registry.jsonis generated fromSchemas/registry.jsonpublic/runtime/results.sef.jsonis the compiled result transformerpublic/runtime/validators/contains the compiled validator bundles used by the browser
These generated runtime files are committed to git. The project does not recompile them automatically during npm start, npm run build, or GitHub Actions builds.
npm run buildnpm run build assumes those runtime assets are already up to date.
- The runtime first matches on the XML root local name and namespace.
- It then narrows candidates deterministically using explicit
CustomizationIDandProfileIDvalues fromSchemas/registry.json. - Exact
CustomizationIDwins over prefix matches, and both win over unconstrained entries. - Exact
ProfileIDthen narrows the remaining candidates. - If multiple candidates still remain, validation stops with an ambiguity error instead of guessing.
- For profiles that require layered validation, the
schematronsarray is executed in order and all findings are merged.
npm run build:pagesGitHub Actions publishes dist/schematron-validator/browser to Pages and injects the correct repository base path at build time.