Giter Club home page Giter Club logo

Comments (7)

MikeEdgar avatar MikeEdgar commented on August 13, 2024

@benisantos, thanks for opening this issue. I am considering if there are any negative side affects from supporting something like this.

Have you considered trying something like this?

<elementType name="AnyElement" base="string" maxLength="99999" />

<segmentType name="FOO">
    <sequence>
      <element ref="RealElement1" minOccurs="1" />
      <element ref="RealElement2" />
      <element ref="AnyElement" />
      <element ref="AnyElement" />
      <element ref="AnyElement" />
    </sequence>
  </segmentType>

from staedi.

benisantos avatar benisantos commented on August 13, 2024

Have you considered trying something like this?

Yes, I have. I don't like so much that workaround because I guess it has some impact on performance (compared to do a real skip).

At this moment, my workaround is to define my "any" segments like empty segments:

<segmentType name="FOO">
    <sequence/>
</segmentType>

and ignore TOO_MANY_DATA_ELEMENTS on that cases.

from staedi.

MikeEdgar avatar MikeEdgar commented on August 13, 2024

Performance shouldn't be impacted too much either way. Can I assume this request is mainly because you're dealing with specifications in PDF that need to be coded in the schema manually? Would you ideally have the full segment schema and just ignore the data when parsing?

from staedi.

MikeEdgar avatar MikeEdgar commented on August 13, 2024

@benisantos - additionally, do you have cases where the segment needs some elements validated and others not validated? Or is it all or nothing?

from staedi.

benisantos avatar benisantos commented on August 13, 2024

Can I assume this request is mainly because you're dealing with specifications in PDF that need to be coded in the schema manually?

Yes, you can. Now, I only interested in parse (and validate) some segments. Later, it might be that I had to validate all of them. It's not sure.

Would you ideally have the full segment schema and just ignore the data when parsing?

Yes, I would. But code a full schema is out of scope now :( I only need "full" validation in some segments. Moreover, I'm afraid that some clients don't fulfill the full specs.

additionally, do you have cases where the segment needs some elements validated and others not validated? Or is it all or nothing?

At this moment, it's all or nothing. But, in the medium/long term, maybe the other way.

from staedi.

MikeEdgar avatar MikeEdgar commented on August 13, 2024

@benisantos - please take a look at version 1.6.0 when you get a chance, along with the updated documentation.

Please let me know if you hit any bugs with the new feature. Thanks!

from staedi.

benisantos avatar benisantos commented on August 13, 2024

Thank you @MikeEdgar !
My first tests have been successful :)

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.