Comments (12)
@benisantos - this is supported using "implementation" schemas. Take a look at the Validation page on the wiki. Basically, you define the transaction
schema as the base standard, then you customize the segments using <implementation>
. If it ends up being too large, you can always defined the implementation in a separate file and include the other schema that defines the transaction
and all the segment and element types.
That example in the wiki is very basic (just a single segment), but the idea applies to both segments and loops. Let me know if you have further questions. The example could probably be a bit more complex.
from staedi.
I'm taking a look at src/test/resources
, but I have a doubt:
- There are examples of reusing a transaction segment in the implementation without changes. For instance:
<segment type="AK2">
<!-- Unchanged from standard -->
</segment>
- But I don't find an example of reuse a full loop in the same way. Is supported something like that on an implementation?
<loop code="foo" type="bar">
<!-- Unchanged from standard -->
</loop>
from staedi.
@benisantos - that is not supported. Typically, implementations of a loop will reduce the occurrences of segments or remove them altogether, so I don't think there would really be a case for using the loop as-is. In the case of PNRGOV, the document you linked is the implementation guide. I have not been able to locate the standard definition, but I believe it would likely be a more general description of the message. For example, all references to TVL
would be identical. It's only in the implementation guide where the different TVL
requirements are specified.
Do you know if the PNRGOV standard is available anywhere?
from staedi.
@MikeEdgar I don't know any standard documentation like you suggest :(
I'll try your transaction-vs-implementation advice as soon as I can.
Anyway, Thank you for your help!
from staedi.
@MikeEdgar I think I found an error related to transaction-vs-implementation schemas and empty segments (like SRC
in PNRGOV), when the empty segment is the first element of the loop (in other positions works perfectly).
If I change the transaction and implementation schemas to remove SRC
and remove as well from the EDIFACT file, the validation is OK. Same, if I put SRC
as second or third position of the loop. But in first position, the validation process fails.
Could you realize where the problem is? Or do you need a failed test to help you?
from staedi.
@benisantos , I will take a look later today, but a test case would definitely be appreciated!
from staedi.
@MikeEdgar I have created a custom issue (#79) for the problem with empty segments starting loops. And I have attached a failed test case :)
from staedi.
@benisantos - how are things going with your implementation using the PNRGOV guide? I wanted to check if there is anything still needed on this issue.
from staedi.
Sorry @MikeEdgar , I'm busy with other business now :( I'll go back to this issue as soon as I can.
from staedi.
Hi @benisantos - I just wanted to follow up on this one to see if you were able to solve your schema issue.
from staedi.
Hi @MikeEdgar ! Yes, the schema issue was solved with the advice of question #104. This question could be closed :)
And thank you for this awesome lib!
from staedi.
@benisantos , thank you, glad to hear that!
from staedi.
Related Issues (20)
- 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
- default decimal mark is point (.) when UNA segment is not present HOT 2
- HL Segment is not interpreted correctly by ReaderService HOT 17
- How to define element inside element in schema? HOT 7
- How to process large EDI files in reader service HOT 5
- staedi api : EDIStreamReader fail to parse if segment element has accent marks . HOT 12
- Edi 835 Never Emitting a START_TRANSACTION HOT 3
- dots in an element in the ISA results in ELEMENT_OCCURRENCE_ERROR HOT 2
- Improper parse of simple 837 HOT 5
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.