- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 81
          Introducing repetition_delimiter to EDI schema.
          #215
        
          New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
  
     Merged
                    Changes from all commits
      Commits
    
    
  File filter
Filter by extension
Conversations
          Failed to load comments.   
        
        
          
      Loading
        
  Jump to
        
          Jump to file
        
      
      
          Failed to load files.   
        
        
          
      Loading
        
  Diff view
Diff view
There are no files selected for viewing
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
        
          
          
            155 changes: 155 additions & 0 deletions
          
          155 
        
  extensions/omniv21/fileformat/edi/.snapshots/TestRead-1_seg_decl_with_rep-delim,_success
  
  
      
      
   
        
      
      
    
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,155 @@ | ||
| { | ||
| "Records": [ | ||
| { | ||
| "Children": [ | ||
| { | ||
| "Children": [ | ||
| { | ||
| "Children": null, | ||
| "Data": "D8", | ||
| "FirstChild": null, | ||
| "FormatSpecific": null, | ||
| "LastChild": null, | ||
| "NextSibling": null, | ||
| "Parent": "(ElementNode d8)", | ||
| "PrevSibling": null, | ||
| "Type": "TextNode" | ||
| } | ||
| ], | ||
| "Data": "d8", | ||
| "FirstChild": "(TextNode 'D8')", | ||
| "FormatSpecific": null, | ||
| "LastChild": "(TextNode 'D8')", | ||
| "NextSibling": "(ElementNode d_date)", | ||
| "Parent": "(ElementNode DMG)", | ||
| "PrevSibling": null, | ||
| "Type": "ElementNode" | ||
| }, | ||
| { | ||
| "Children": [ | ||
| { | ||
| "Children": null, | ||
| "Data": "19910512", | ||
| "FirstChild": null, | ||
| "FormatSpecific": null, | ||
| "LastChild": null, | ||
| "NextSibling": null, | ||
| "Parent": "(ElementNode d_date)", | ||
| "PrevSibling": null, | ||
| "Type": "TextNode" | ||
| } | ||
| ], | ||
| "Data": "d_date", | ||
| "FirstChild": "(TextNode '19910512')", | ||
| "FormatSpecific": null, | ||
| "LastChild": "(TextNode '19910512')", | ||
| "NextSibling": "(ElementNode d_cat)", | ||
| "Parent": "(ElementNode DMG)", | ||
| "PrevSibling": "(ElementNode d8)", | ||
| "Type": "ElementNode" | ||
| }, | ||
| { | ||
| "Children": [ | ||
| { | ||
| "Children": null, | ||
| "Data": "RET", | ||
| "FirstChild": null, | ||
| "FormatSpecific": null, | ||
| "LastChild": null, | ||
| "NextSibling": null, | ||
| "Parent": "(ElementNode d_cat)", | ||
| "PrevSibling": null, | ||
| "Type": "TextNode" | ||
| } | ||
| ], | ||
| "Data": "d_cat", | ||
| "FirstChild": "(TextNode 'RET')", | ||
| "FormatSpecific": null, | ||
| "LastChild": "(TextNode 'RET')", | ||
| "NextSibling": "(ElementNode d_cat)", | ||
| "Parent": "(ElementNode DMG)", | ||
| "PrevSibling": "(ElementNode d_date)", | ||
| "Type": "ElementNode" | ||
| }, | ||
| { | ||
| "Children": [ | ||
| { | ||
| "Children": null, | ||
| "Data": "RET", | ||
| "FirstChild": null, | ||
| "FormatSpecific": null, | ||
| "LastChild": null, | ||
| "NextSibling": null, | ||
| "Parent": "(ElementNode d_cat)", | ||
| "PrevSibling": null, | ||
| "Type": "TextNode" | ||
| } | ||
| ], | ||
| "Data": "d_cat", | ||
| "FirstChild": "(TextNode 'RET')", | ||
| "FormatSpecific": null, | ||
| "LastChild": "(TextNode 'RET')", | ||
| "NextSibling": "(ElementNode d_code)", | ||
| "Parent": "(ElementNode DMG)", | ||
| "PrevSibling": "(ElementNode d_cat)", | ||
| "Type": "ElementNode" | ||
| }, | ||
| { | ||
| "Children": [ | ||
| { | ||
| "Children": null, | ||
| "Data": "2135-2", | ||
| "FirstChild": null, | ||
| "FormatSpecific": null, | ||
| "LastChild": null, | ||
| "NextSibling": null, | ||
| "Parent": "(ElementNode d_code)", | ||
| "PrevSibling": null, | ||
| "Type": "TextNode" | ||
| } | ||
| ], | ||
| "Data": "d_code", | ||
| "FirstChild": "(TextNode '2135-2')", | ||
| "FormatSpecific": null, | ||
| "LastChild": "(TextNode '2135-2')", | ||
| "NextSibling": "(ElementNode d_code)", | ||
| "Parent": "(ElementNode DMG)", | ||
| "PrevSibling": "(ElementNode d_cat)", | ||
| "Type": "ElementNode" | ||
| }, | ||
| { | ||
| "Children": [ | ||
| { | ||
| "Children": null, | ||
| "Data": "2106-3", | ||
| "FirstChild": null, | ||
| "FormatSpecific": null, | ||
| "LastChild": null, | ||
| "NextSibling": null, | ||
| "Parent": "(ElementNode d_code)", | ||
| "PrevSibling": null, | ||
| "Type": "TextNode" | ||
| } | ||
| ], | ||
| "Data": "d_code", | ||
| "FirstChild": "(TextNode '2106-3')", | ||
| "FormatSpecific": null, | ||
| "LastChild": "(TextNode '2106-3')", | ||
| "NextSibling": null, | ||
| "Parent": "(ElementNode DMG)", | ||
| "PrevSibling": "(ElementNode d_code)", | ||
| "Type": "ElementNode" | ||
| } | ||
| ], | ||
| "Data": "DMG", | ||
| "FirstChild": "(ElementNode d8)", | ||
| "FormatSpecific": null, | ||
| "LastChild": "(ElementNode d_code)", | ||
| "NextSibling": null, | ||
| "Parent": "(DocumentNode)", | ||
| "PrevSibling": null, | ||
| "Type": "ElementNode" | ||
| } | ||
| ], | ||
| "FinalErr": "EOF" | ||
| } | 
        
          
          
            164 changes: 162 additions & 2 deletions
          
          164 
        
  extensions/omniv21/fileformat/edi/.snapshots/TestRead-2_seg_decls,_success
  
  
      
      
   
        
      
      
    
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -1,7 +1,167 @@ | ||
| { | ||
| "Records": [ | ||
| "{'e1':'0','e2':'1','e3':'2'}", | ||
| "{'e1':'3','e2':'4','e3':'5'}" | ||
| { | ||
| "Children": [ | ||
| { | ||
| "Children": [ | ||
| { | ||
| "Children": null, | ||
| "Data": "0", | ||
| "FirstChild": null, | ||
| "FormatSpecific": null, | ||
| "LastChild": null, | ||
| "NextSibling": null, | ||
| "Parent": "(ElementNode e1)", | ||
| "PrevSibling": null, | ||
| "Type": "TextNode" | ||
| } | ||
| ], | ||
| "Data": "e1", | ||
| "FirstChild": "(TextNode '0')", | ||
| "FormatSpecific": null, | ||
| "LastChild": "(TextNode '0')", | ||
| "NextSibling": "(ElementNode e2)", | ||
| "Parent": "(ElementNode ISA)", | ||
| "PrevSibling": null, | ||
| "Type": "ElementNode" | ||
| }, | ||
| { | ||
| "Children": [ | ||
| { | ||
| "Children": null, | ||
| "Data": "1", | ||
| "FirstChild": null, | ||
| "FormatSpecific": null, | ||
| "LastChild": null, | ||
| "NextSibling": null, | ||
| "Parent": "(ElementNode e2)", | ||
| "PrevSibling": null, | ||
| "Type": "TextNode" | ||
| } | ||
| ], | ||
| "Data": "e2", | ||
| "FirstChild": "(TextNode '1')", | ||
| "FormatSpecific": null, | ||
| "LastChild": "(TextNode '1')", | ||
| "NextSibling": "(ElementNode e3)", | ||
| "Parent": "(ElementNode ISA)", | ||
| "PrevSibling": "(ElementNode e1)", | ||
| "Type": "ElementNode" | ||
| }, | ||
| { | ||
| "Children": [ | ||
| { | ||
| "Children": null, | ||
| "Data": "2", | ||
| "FirstChild": null, | ||
| "FormatSpecific": null, | ||
| "LastChild": null, | ||
| "NextSibling": null, | ||
| "Parent": "(ElementNode e3)", | ||
| "PrevSibling": null, | ||
| "Type": "TextNode" | ||
| } | ||
| ], | ||
| "Data": "e3", | ||
| "FirstChild": "(TextNode '2')", | ||
| "FormatSpecific": null, | ||
| "LastChild": "(TextNode '2')", | ||
| "NextSibling": null, | ||
| "Parent": "(ElementNode ISA)", | ||
| "PrevSibling": "(ElementNode e2)", | ||
| "Type": "ElementNode" | ||
| } | ||
| ], | ||
| "Data": "ISA", | ||
| "FirstChild": "(ElementNode e1)", | ||
| "FormatSpecific": null, | ||
| "LastChild": "(ElementNode e3)", | ||
| "NextSibling": null, | ||
| "Parent": "(DocumentNode)", | ||
| "PrevSibling": null, | ||
| "Type": "ElementNode" | ||
| }, | ||
| { | ||
| "Children": [ | ||
| { | ||
| "Children": [ | ||
| { | ||
| "Children": null, | ||
| "Data": "3", | ||
| "FirstChild": null, | ||
| "FormatSpecific": null, | ||
| "LastChild": null, | ||
| "NextSibling": null, | ||
| "Parent": "(ElementNode e1)", | ||
| "PrevSibling": null, | ||
| "Type": "TextNode" | ||
| } | ||
| ], | ||
| "Data": "e1", | ||
| "FirstChild": "(TextNode '3')", | ||
| "FormatSpecific": null, | ||
| "LastChild": "(TextNode '3')", | ||
| "NextSibling": "(ElementNode e2)", | ||
| "Parent": "(ElementNode ISA)", | ||
| "PrevSibling": null, | ||
| "Type": "ElementNode" | ||
| }, | ||
| { | ||
| "Children": [ | ||
| { | ||
| "Children": null, | ||
| "Data": "4", | ||
| "FirstChild": null, | ||
| "FormatSpecific": null, | ||
| "LastChild": null, | ||
| "NextSibling": null, | ||
| "Parent": "(ElementNode e2)", | ||
| "PrevSibling": null, | ||
| "Type": "TextNode" | ||
| } | ||
| ], | ||
| "Data": "e2", | ||
| "FirstChild": "(TextNode '4')", | ||
| "FormatSpecific": null, | ||
| "LastChild": "(TextNode '4')", | ||
| "NextSibling": "(ElementNode e3)", | ||
| "Parent": "(ElementNode ISA)", | ||
| "PrevSibling": "(ElementNode e1)", | ||
| "Type": "ElementNode" | ||
| }, | ||
| { | ||
| "Children": [ | ||
| { | ||
| "Children": null, | ||
| "Data": "5", | ||
| "FirstChild": null, | ||
| "FormatSpecific": null, | ||
| "LastChild": null, | ||
| "NextSibling": null, | ||
| "Parent": "(ElementNode e3)", | ||
| "PrevSibling": null, | ||
| "Type": "TextNode" | ||
| } | ||
| ], | ||
| "Data": "e3", | ||
| "FirstChild": "(TextNode '5')", | ||
| "FormatSpecific": null, | ||
| "LastChild": "(TextNode '5')", | ||
| "NextSibling": null, | ||
| "Parent": "(ElementNode ISA)", | ||
| "PrevSibling": "(ElementNode e2)", | ||
| "Type": "ElementNode" | ||
| } | ||
| ], | ||
| "Data": "ISA", | ||
| "FirstChild": "(ElementNode e1)", | ||
| "FormatSpecific": null, | ||
| "LastChild": "(ElementNode e3)", | ||
| "NextSibling": null, | ||
| "Parent": "(DocumentNode)", | ||
| "PrevSibling": null, | ||
| "Type": "ElementNode" | ||
| } | ||
| ], | ||
| "FinalErr": "EOF" | ||
| } | 
      
      Oops, something went wrong.
        
    
  
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[OUT OF SCOPE]
These 4 delimiters may be gleaned from the
ISAheader as the whole segment is fixed length and the separator characters are in deterministic positions:This is clearly beyond the scope of this change, and the proposed configuration option matches the current paradigm as expected.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the feedback. Yes we were aware of the fixed positions of these separators/delimiters in the header segment. However, our design goal / philosophy, as you might have figured out by now, was to make this library as flexible as possible and not bound to a given EDI standard. Different standards (X12/EDIFact/etc) have different headers, different delimiters and their positions. We felt the current approach allows flexibility.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's great to know. Thanks for sharing your insight.