Comments (6)
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.
Was soll denn der Wert dieses acceptMatch Feldes sein?
from validator.
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.
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.
@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.
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)
- Make createReport optional HOT 2
- Role is null in FailedAssert HOT 9
- Loading of XSLT throws exception HOT 3
- Absolute path required
- Jakarta support HOT 2
- Deamon Mode Exception at startup HOT 4
- IllegalArgumetException wenn Repository Parameter nicht angegeben HOT 2
- BR-17 BT-59 Same name für Payee and Seller is an error since xrechnung-2.3 HOT 3
- Multi language support for reports
- Assertion results output
- Saxon throws exception with new 1.5.0 validator (Java) HOT 4
- Documentation for version 1.5.0 not updated
- ValidationTool 1.5.0 Fails with "java.lang.IllegalArgumentException: No repository location for scenario definition 'default_1'" HOT 2
- Broken matching in multiple scenario files
- maven pom doesn't specify transitive dependencies HOT 2
- Document valid on https://kositvalidator.service-bw.de/ (1.4.2) not valid locally (neither 1.4.2 nor 1.5.0) HOT 5
- Error because of normalize-space getting multiple arguments
- Fehlermeldung "Leitweg-ID ungültig" bei ungültigen XML-Dateien umformulieren HOT 1
- Validator fails on xslt compiled by schxslt 1.9.x and saxon-he 11.3 HOT 5
- Make schemaValidate optional
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from validator.