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

XRechnung validations on Basic Profile? #688

Open
kaikuchn opened this issue Jan 16, 2025 · 1 comment
Open

XRechnung validations on Basic Profile? #688

kaikuchn opened this issue Jan 16, 2025 · 1 comment

Comments

@kaikuchn
Copy link

kaikuchn commented Jan 16, 2025

Hey,

I've noticed some notice severity validation failures when checking a valid ZUGFeRD PDF with a Basic-Profile XML. Looking at the code I found this default case in validateXR:

} else { // This is the default check which is also run on en16931 files to generate notices.
validateSchematron(xml, "/xslt/XR_30/XRechnung-CII-validation.xslt", 27, errorImpact);
}

That is called from this code block:
if (context.getFormat().equals("CII")) {
if (context.getGeneration().equals("2")
&& (isBasic || isEN16931 || isXRechnung)) {
//additionally validate against CEN
validateSchematron(zfXML, "/xslt/en16931schematron/EN16931-CII-validation.xslt", 24, ESeverity.error);
if (!disableNotices || XrechnungSeverity != ESeverity.notice) {
validateXR(zfXML, XrechnungSeverity);
}
}
}

Is there a reason why /xslt/XR_30/XRechnung-CII-validation.xslt is used to validate a Basic-Profile XML?

Best regards,
Kai

@jstaerk
Copy link
Collaborator

jstaerk commented Feb 17, 2025

It only creates notices, the idea is that if you enter something en16931-ish you get notices "if you did that you would also get a valid XRechnung". You can switch off notices e.g. with --no-notices

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