Hello Klaus, First of all, many thanks for your feed-back.
- I fully agree that syntax 1 cannot be used with D.97A - I did not notice it when I took this sample from Seagate, see http://www.seagate.com/docs/pdf/edi/orders-message-guidelines.pdf. Then, I have also noticed that they were using "UNOA" with lower case characters :-/ OK, who's writing to Seagate ;-) - So, you thing that I better remove empty elements... OK, I will do it ;-) - I was indeed thinking about the following structure: <int:UNA> <int:UNB> <int:UNH> <ORDERS.D.97A xmlns="http://parse-EDIFACT.net/Message/1/> <BGM> What do you think? - My philosophy is to name the tag by following exactly the EDIFACT specifications, the only needed "customization" is the character to be put in front of simple element, since a XML tag cannot start with a digit, then my heart balances between "_" and "E" ;-) Best regards, Patrice http://babelabout.blogspot.com/ ________________________________ From: Klaus-Dieter Naujok <[email protected]> To: [email protected] Sent: Thu, August 26, 2010 11:01:46 PM Subject: Re: [EDI-L] Re: parse-EDIFACT.net, the alpha version in on-line ;-) Patrice, I decided to drop by to try your parser and observed the following: The test ORDERS message provided as default input data contains: UNB+UNOA:1+IRONWARE:ZZ+098533326:ZZ+011107:1500+186' UNH+72+ORDERS:D:97A:UN' The problem is that using version "1" as Syntax version number in the UNB in combination with "97A" as Message release number in the UNH is not a valid combination. Excerpts from the official text released by the JSWG below will explain why: EDIFACT Application Level Syntax Rules (ISO 9735) Versions 1, 2, 3 and 4 - The differences in context Version 1 First published in 1988, this particular version no longer supports recent releases of the UN/EDIFACT directories. The directory version/release has changed from a numeric notation (eg. 91.2) to an alphanumeric format (eg. D.99B). In the UNG (Functional group header) and the UNH (Message header) service segments the corresponding data elements (0052/0054) are defined as being numeric. Version 2 Published in 1990, the syntax rules specified in Version 2 remained unchanged from Version 1 with the exception that the alphanumeric version/release format is supported and the status of the message release number (0054) and controlling agency (0051) were changed from conditional to mandatory. --- To sum it up, the only UN/EDIFACT directories that used numeric notations and therefore can be used with version 1 of the syntax, are: 88.1, 90.1, 90.2, 91.1, 91.2, 92.1 and 93.2. As to your XML output, I noticed no surpression of empty elements is being performed, especial truncation as in the original EDIFACT input (+011107:1500+186'): <S004> <E0017>011107</E0017> <E0019>1500</E0019> </S004> <E0020>186</E0020> <S005> <E0022></E0022> <E0025></E0025> </S005> <E0026></E0026> <E0029></E0029> <E0031></E0031> <E0032></E0032> <E0035></E0035> </UNB> Why not stop after d/e 0020? <S004> <E0017>011107</E0017> <E0019>1500</E0019> </S004> <E0020>186</E0020> </UNB> Also your root element is <ORDERS.D.97A>, if that is to identify that the rest is the content of the ORDERS message, why include the UNB which is not part of the message? <ORDERS.D.97A> <UNB> <S001> If you want to include the complete interchange why not start with the interchange as root element? This would be beneficial if there is a need to convert a complete interchange with more than one message and/or groups. <INTERCHANGE> <UNA>:+.? '</UNA> <UNB> Regarding the XML tags, did you define your own or use someone else's set? Regards, Klaus [Non-text portions of this message have been removed] ------------------------------------ ... Please use the following Message Identifiers as your subject prefix: <SALES>, <JOBS>, <LIST>, <TECH>, <MISC>, <EVENT>, <OFF-TOPIC> Job postings are welcome, but for job postings or requests for work: <JOBS> IS REQUIRED in the subject line as a prefix.Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/EDI-L/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/EDI-L/join (Yahoo! ID required) <*> To change settings via email: [email protected] [email protected] <*> To unsubscribe from this group, send an email to: [email protected] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
