Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken matching in multiple scenario files #122

Open
Lorenzschaef opened this issue Oct 16, 2023 · 1 comment
Open

Broken matching in multiple scenario files #122

Lorenzschaef opened this issue Oct 16, 2023 · 1 comment

Comments

@Lorenzschaef
Copy link

In theory, all the latest releases of the xrechnung validator-configuration (https://github.com/itplr-kosit/validator-configuration-xrechnung) have a scenario for validating EN16931 (CII) without the XRechnung rules. The match-tag of the scenario is as follows:

    <match>exists(/rsm:CrossIndustryInvoice[ rsm:ExchangedDocumentContext/ram:GuidelineSpecifiedDocumentContextParameter/ram:ID/text() = 'urn:cen.eu:en16931:2017'])</match>

If I use any of these scenario files alone, I can validate my file, which starts like this:

<?xml version="1.0" encoding="UTF-8"?>
<rsm:CrossIndustryInvoice xmlns:rsm="urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100" xmlns:qdt="urn:un:unece:uncefact:data:standard:QualifiedDataType:100" xmlns:ram="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:udt="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100">
  <rsm:ExchangedDocumentContext>
    <ram:GuidelineSpecifiedDocumentContextParameter>
      <ram:ID>urn:cen.eu:en16931:2017</ram:ID>
...

However, if I load more than one scenario file, which all contain this same scenario, the validator says there is no matching scenario.

Bildschirmfoto 2023-10-16 um 17 03 43

On the other hand, I am perfectly able to validate different versions of XRechnung through the same validator instance. So the problem seems to be, that more than one scenario matches!?

I would expect the validator to execute the first matching scenario.

@wurst-hans
Copy link

I'm using multiple scenarios too and have commented out the common EN16931 rules (except the specific ones for XRechnung) in all other scenario files except the current 3.0.2. So EN16931 gets validated via latest 3.0.2 configuration only.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants