XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
How to avoid data duplication in schematron files?

I have recently started to take a closer look at the EU e-invoice schematron validator and need some tip how data duplication could be avoided in this project (find some basic background in the end of the email).
In this project some schematron files are quite identical for different formats, as the rules to be tested rely on the semantic model or on common parts called code lists.
I already described the problem in an issue, but it was closed, I fear due to the lack of knowledge how to handle it. Therefore I would like to provide an example, as I believe it should work somehow..

Let's take a look at the two code list files, being close to equal:
validation\ubl\schematron\codelist\EN16931-codes.sch
validation\cii\schematron\codelist\EN16931-CII-codes.sch  
The files should only differ in the context being used.

It's been more than fifteen years since I used XPath/XSLT, so I was a little rusty, but I thought the 'calling' schematron file 
(see https://github.com/CenPC434/validation/blob/master/cii/schematron/EN16931-CII-validation.sch
should simply provide the context as parameters, like a module is calling a sub-module.
It did not work out, as <sch:include> does now allow any children such as parameter.
You may see my erroneous approach as GIT diff, making the schematron pattern abstract and providing the varying context from the caller.

Could someone point me into a problem-solving direction, please?

Thanks in advance,
Svante

PS: Some basic background:
The EU requires from its member states to accept electronic XML invoices either based on UBL or CII (UN/CEFEACT cross-industry invoice) called EN 16931.
The elegant trick they have been using is to define a semantic model and map it to each XML format. The first two parts of the spec are free available, the mapping is not.

  






[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS