Giter VIP home page Giter VIP logo

Comments (6)

apenski avatar apenski commented on May 27, 2024

The acceptMatch element is a configuration option introduced in recent validator version. This allows evaluation on API-level. See #27 for details.

The current validator configuration for xRechnung does not use this yet.

@rkottmann this isn't a validator problem. It is expected behaviour to give an acceptRecommendation of UNDEFINED when no acceptMatch is configured. It's up to the configuration to determine what's acceptable or not. At least for this release, we have no sensible defaults.

So I guess the ticket was reported correctly to address a problem in the configuration.

from validator.

JannickWeisshaupt avatar JannickWeisshaupt commented on May 27, 2024

Was soll denn der Wert dieses acceptMatch Feldes sein?

from validator.

MrMikeFloyd avatar MrMikeFloyd commented on May 27, 2024

Was soll denn der Wert dieses acceptMatch Feldes sein?

Wenn ich den Quellcode korrekt interpretiere, würde das Füllen von acceptMatch mit einem beliebigen Wert (if (isNotBlank(acceptMatch)) {) das Auslösen der Bewertung (ACCEPTABLE|REJECT) zur Folge haben.

from validator.

JannickWeisshaupt avatar JannickWeisshaupt commented on May 27, 2024

Leider nicht, da getAcceptSelector den Inhalt von acceptMatch ausgibt und dann als xpath auswertet. Ob es dann valide oder nicht ist, wird dann durch selector.getEffectiveBoolean bestimmt. Ich hatte es so verstanden, dass man eine xpath eingeben soll, welche auf rep:accept zeigt. Allerdings schien das bei mir auch nicht zu funktionieren. Vielleicht war ich aber auch verwirrt durch itplr-kosit/validator-configuration-xrechnung#15

from validator.

apenski avatar apenski commented on May 27, 2024

@JannickWeisshaupt acceptMatch belongs to your request/issue #27 and your understanding regarding evaluation is correct. We decided to make no assumption about what is acceptable in the current scenario/configuration. So the configuration needs to define what is acceptable by configuring a xpath-expression which evaluates to boolean value.

So, at the moment only with a scenario with acceptMatch configuration you can get a 'accept recommendation' with a value other than undefined.

Whether this is sensible or maybe better option would be to have defaults like rejecting a file, when it's not schema-compliant or not schematron-compliant or not well-formed at all is up for discussion at the moment. And this not only related to xrechnung.

@MrMikeFloyd, it's imho a bug, that the xrechnung-configuration does not use this at the moment. (@renzok can you please fix this?) But the current validator implementation SHOULD be able to process/use existing configurations for pre 1.1.0 releases since this is just an optional feature/element.

The scenario.xsd is not deprecated at all. We just added some more features and the option to better integrate the validator into custom code by extending the existing API (see Check.java#L54 and Result.java)

So this is the explanation for the actual feature. @renzok we need to have look what should be done regarding xrechnung-configuration to leverage this feature.

from validator.

apenski avatar apenski commented on May 27, 2024

We've changed behaviour of the validator in 1.2.0. Schema and schematron errors are now considered when evaluating the AcceptRecommendation. Xml without any errors would now evaluate to getAcceptRecommendation() == 'ACCEPTABLE', xml with schema or schematron errors would now always result in getAcceptRecommendation() == 'REJECT'.

However, you can overrule schematron errors with an acceptMatch configuration in your scenario. See api documentation for further information about acceptMatch

from validator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.