ConnectingEurope / eInvoicing-EN16931

Validation artefacts for the European eInvoicing standard EN 16931
Other
134 stars 53 forks source link

Joining the abstract model schematron files #135

Closed svanteschubert closed 5 years ago

svanteschubert commented 5 years ago

Within this validation project for every syntax UBL/CII/EDIFACT exist an abstract model directory containing a rule schematron file upon the EU semantic model:

validation\ubl\schematron\abstract\EN16931-model.sch validation\cii\schematron\abstract\EN16931-CII-model.sch validation\edifact\schematron\abstract\EN16931-EDIFACT-model.sch

All three files have many rules in common and do not bear any specific rules for a certain syntax.

To avoid data duplication and keep the quality across the syntax formats consistent, I would suggest to combine all three files into a single one, such as validation\common\schematron\abstract\EN16931-model.sch Even if there would be specific rules, the outsourcing of the common rules would improve code quality by reducing duplication.

A similar data duplication can be observed between the codelists of XML syntaxes UBL and CII: validation\ubl\schematron\codelist\EN16931-codes.sch validation\cii\schematron\codelist\EN16931-CII-codes.sch combining those two files into one file for the XML languages, such as validation\common\schematron\codelist\EN16931-xml-codes.sch would improve overal code quality.

oriol commented 5 years ago

This was the original idea for this validation architecture, but was not implemented due to its more complex management a while ago.