Closed benisantos closed 4 years ago
Hi @benisantos - this is somewhat expected behaviour since implementations typically should not override the standard, but rather fall within its guidelines. I think that aligns with the PNRGOV documentation, section 1.4, item 5:
If a composite or data element is defined as conditional in the IATA approved message but must be mandatory to complete a business function, the composite or data element will be indicated with a M for mandatory along with an asterisk (). The `M` will indicate the status differs from the PADIS Message Standard.
The last sentence is the key part, saying that the standard was different from M
, i.e. C
. I read that as saying that the M*
means that the standard is minOccurs="0"
, but the implementation is minOccurs="1"
. Is it possible to put the more relaxed rule in the standard and constrain it in the implementation schema?
Thank you @MikeEdgar for the quick reply. Yes, it's possible to turn the strategy around, and it's like we solved until now :)
Other problem: after upgrade to 1.10.2 I'm getting NPEs in Validator class, line 740:
// TODO: Implementation nodes must be incremented and validated (#88)
if (this.isComposite()) {
this.implComposite = implSeg.getChild(this.composite.getIndex()); // returns null
this.implElement = this.implComposite.getChild(this.element.getIndex()); // line 740 => NPE
} else if (this.element != null) {
I have to prepare a failing test case to report. Maybe is it related with TODO #88 ?
@benisantos - thanks for letting me know about the NPE. Can it be reproduced with the example you gave in the file attached to this issue?
No, the NPE is thrown in a more complex example, but I'm not authorized to share it :( I'll try to locate the problem and prepare a small test case. Sorry!
Sure, no problem.
I've created a new issue (#106) about the NPE with a test case.
@benisantos - please let me know if anything else is needed with this issue.
It's ok. Close it when you want. Thank you.
Thanks @benisantos. Closing this - the solution was to use the less restrictive constraints in the standard. Please re-open in anything else arises with this one.
Regarding question/issue #78, I'm trying implementation schemas to achieve the goal, but I've a problem at "relaxing" the minOccurs attribute of some elements/composites.
A failed test is attached. There is a FIXME comment in the implementation schema about the issue.
validation-multi-level-test.zip