How op-ted/eforms-sdk works
Project type and purpose
• This is an open-source SDK (library) providing all metadata and validation assets needed to build eForms applications for public procurement notices. It is not a standalone frontend/backend app, but a resource bundle and validation engine you import into your own tooling.
Key modules and their roles
• Codelists
• Controlled vocabularies (Genericode files) used in notices.
• Consumed by schemas and Schematron rules, and driving UI dropdowns in generated forms.
• Schemas
• “common” folder: UBL-2.3 base schemas and EFORMS extensions.
• “maindoc” folder: Notice-specific XSDs (ContractNotice, ContractAwardNotice, PriorInformationNotice, BusinessRegistrationInformationNotice) that import from the common schemas.
• Schematrons
• Static rules: basic structural checks running against the schemas.
• Dynamic rules: stage-based validation logic, one file per stage and notice type.
• They reference both the XSD schemas (for element names) and the codelists (for allowed values).
• EFX-grammar
• ANTLR4 grammar defining the expression language for constraints inside notices and validation rules.
• Generates a parser used by validation tooling.
• Notice-types and fields JSON
• Form structure: which fields belong to each notice subtype, their types, dependencies.
• Drive dynamic form generation and validation scenarios.
• View-templates and translations
• EFX-based templates and localized XML files used to render notices for human viewing.
• Use notice-types, fields and translations to create UI layouts or printable views.
• Examples
• Sample XML notices and their SVRL validation reports, illustrating correct and incorrect cases.
Relationships and data flow
• The maindoc XSDs import common XSD modules.
• Schematron rules load the maindoc schemas and the codelists to verify both structure and business constraints.
• Notice-types + fields definitions feed UI form generators and validation scenarios.
• EFX grammar parser is invoked during validation when rules include mini-expressions.
• View-templates combine with translations and notice-types/fields to render forms or XML previews.
• Examples demonstrate the end-to-end: schema validation → schematron validation → SVRL report.
Architectural patterns
• Modular resource layering:
common schemas → maindoc schemas → schematron rules.
metadata (codelists, notice-types, fields) → form generation + validation → view templates.
• Separation of concerns:
• Data definitions (XSD, JSON)
• Validation logic (Schematron + EFX)
• Presentation (EFX view templates + translations)
• Build & CI:
• Maven project packaging all assets into an SDK JAR.
• GitHub Actions run code analysis, performance benchmarks, and publish to Maven Central.
Capturing “common” ↔ “maindoc” relations accurately
• This explicitly shows that every notice schema builds on the base UBL/EForms common definitions before applying business validation.