-
Notifications
You must be signed in to change notification settings - Fork 17
Description
Hi,
we currently use the accept flag calculated by the validator in a webservice. The validator sets the flag to REJECTED if there is a failed assertion, even if it's only a warning
.anyMatch(FailedAssert.class::isInstance)
In the default-report.xml though, the calculation of the recommendation differs from the calculation of the validator. There, only real errors will lead to a reject recommendation. The invoice may contain warnings which are not taken into account here.
In the end the xml-report says "accept" although the report-result says "reject"
select="count(//rep:message[@level eq 'error'])"
select="count(//rep:message[rep:custom-level(.) eq 'error'])"
validator-configuration-xrechnung/src/default-report.xsl
Lines 743 to 766 in 1e62a80
| <xsl:variable name="e1" as="xs:integer" | |
| select="count(//rep:message[@level eq 'error'])" /> | |
| <xsl:variable name="e2" as="xs:integer" | |
| select="count(//rep:message[rep:custom-level(.) eq 'error'])" /> | |
| <xsl:choose> | |
| <xsl:when test="empty(rep:scenarioMatched) or rep:scenarioMatched/s:scenario/s:name[ contains( lower-case(text()), 'fallback')]"> | |
| <p class="important error" | |
| >Bewertung: Es wird empfohlen das Dokument zurückzuweisen. Da kein Pruefszenario gegriffen hat.</p> | |
| </xsl:when> | |
| <xsl:when test="$e1 eq 0 and $e2 eq 0"> | |
| <p class="important" | |
| >Bewertung: Es wird empfohlen das Dokument anzunehmen und weiter zu verarbeiten.</p> | |
| </xsl:when> | |
| <xsl:when test="$e1 gt 0 and $e2 eq 0"> | |
| <p class="important" | |
| >Bewertung: Es wird empfohlen das Dokument anzunehmen und zu verarbeiten, da die vorhandenen Fehler derzeit toleriert werden.</p> | |
| </xsl:when> | |
| <xsl:otherwise> | |
| <p class="important error" | |
| >Bewertung: Es wird empfohlen das Dokument zurückzuweisen.</p> | |
| </xsl:otherwise> | |
| </xsl:choose> | |
| </xsl:template> |
We are wondering if this discrepancy is intended, since the report-result and generated xml-report say something different.
