Comments (7)
@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.
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.
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.
@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.
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.
@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.
Thank you @MikeEdgar !
My first tests have been successful :)
from staedi.
Related Issues (20)
- Automatically use included control schemas in writer
- Implementation schemas not correctly validating when writing EDI
- write X12 file HOT 3
- Add support for obtaining enumeration title values from schema for the element_data HOT 1
- Resolve GitHub action warnings HOT 1
- Control reference and count validation inactive for X12 HOT 3
- Read X12 File Error HOT 6
- Support to Split mulitple GS into separate EDI files HOT 9
- Repetition Elements are not being correctly identified HOT 3
- Error reported when reading ANSI encoded txt file HOT 27
- Missing Mandatory Segments HOT 8
- Does enumerated elements really requires minLength and maxLength? HOT 12
- Reporting a vulnerability HOT 2
- How to apply relational condition in schema HOT 11
- X12 unexpected segment error occurred when first segment of loop is missing HOT 5
- Support multiple ISA segments in an X12 EDI file
- Validator should be reset at end of interchange
- titles for segments like BGN, ST, INS are not accessible in 834 EDI HOT 1
- Adding condition to writeSegment HOT 4
- Option to ignore repetition separator in the ST/SE segments HOT 8
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 staedi.