Giter Club home page Giter Club logo

Comments (9)

MikeEdgar avatar MikeEdgar commented on August 13, 2024

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?

from staedi.

benisantos avatar benisantos commented on August 13, 2024

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 ?

from staedi.

MikeEdgar avatar MikeEdgar commented on August 13, 2024

@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?

from staedi.

benisantos avatar benisantos commented on August 13, 2024

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!

from staedi.

MikeEdgar avatar MikeEdgar commented on August 13, 2024

Sure, no problem.

from staedi.

benisantos avatar benisantos commented on August 13, 2024

I've created a new issue (#106) about the NPE with a test case.

from staedi.

MikeEdgar avatar MikeEdgar commented on August 13, 2024

@benisantos - please let me know if anything else is needed with this issue.

from staedi.

benisantos avatar benisantos commented on August 13, 2024

It's ok. Close it when you want. Thank you.

from staedi.

MikeEdgar avatar MikeEdgar commented on August 13, 2024

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.

from staedi.

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.