Hello Klaus,

- Indeed, not everyone is following UN "directives" ;-)

- Thanks for the ISO/TS 20625:2002, I was not (really) aware about it, but I 
always have the same issue with ISO documents, 158.00 CHF = 121.20 EUR = 153.83 
USD for a 55 pages PDF, that's quite expensive :-/ Anyway, I fully agree with 
your philosophy: << My philosophy is not to reinvent things >> when talking 
about specifications, regarding implementations, it's clear that I like to 
re-invent ;-)

- Two remarks regarding your XML-isation (don't worry about the spaces, your 
code is crystal clear):

* You did not keep the idea of having two different namespaces, one for the 
envelope and one for the message. I am thinking about this  in order to 
associate them later with different schemas, one schema for the envelope and 
one 
schema for message, but now I am realizing that I may have a problem with the 
fact that you put the UNH within the message... What do you think?

* I would put the version within the message tag name, or maybe within its 
namespace:

  - <M_ORDERS.D.97A>
  - <M_ORDERS xmlns=".../D/97A/">

Now, I am wondering if the ISO/TS 20625:2002 would not help me to answer my 
questions... Could you help me?

Many thanks in advance and best regards,

Patrice
http://babelabout.blogspot.com/



________________________________
From: Klaus-Dieter Naujok <news...@mail-etc.net>
To: EDI-L@yahoogroups.com
Sent: Fri, August 27, 2010 1:33:24 AM
Subject: Re: [EDI-L] Re: parse-EDIFACT.net, the alpha version in on-line ;-)


On Aug 26, 2010, at 3:54 PM, Patrice Krakow wrote:

> First of all, many thanks for your feed-back.

Patrice,

You're welcome.

> I have also noticed that they were using "UNOA" with lower case characters :-/

Seagate is not the only one who uses lower case characters with UNOA instead of 
UNOB, something most implementers ignore.

> <int:UNA>
> <int:UNB>
> <int:UNH>
> 
> <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" ;-)

My philosophy is not to reinvent things, therefore I adopted the basic tag 
naming rules of ISO/TS20625 which are:

The names of the XML structure will be derived from the EDI tags. They will be 
given a prefix depending on the structure level (segment group, segment, 
composite data element or data element):

„M_“+ message type           => Example: M_ORDERS 
„G_“+ segment group          => Example: G_SG36
„S_“+ segment                => Example: S_LIN
„C_“+ composite data element => Example: C_C082
„D_“+ data element           => Example: D_3035

-------

I don't need the segment group tag, within the instant of an interchange. I 
also 
reframed from using attributes with in thew XML Tags since that information 
does 
not exist in the original EDIFACT interchange, everything that is within the 
EDIFACT segments is within the XML elements.

Your example would than look like this:

<INTERCHANGE>
  <S_UNA>:+.? '</S_UNA>
  <S_UNB>
    <C_S001>
      <D_0001>UNOB</D_0001>
      <D_0002>2</D_0002>
    </C_S001>
    <C_S002>
      <D_0004>IRONWARE</D_0004>
      <D_0007>ZZ</D_0007>
    </C_S002>
    <C_S003>
      <D_0010>098533326</D_0010>
      <D_0007>ZZ</D_0007>
    </C_S003>
    <C_S004>
      <D_0017>011107</D_0017>
      <D_0019>1500</D_0019>
    </C_S004>
    <D_0020>186</D_0020>
  </S_UNB>
  <M_ORDERS>
    <S_UNH>
      <D_0062>72</D_0062>
      <C_S009>
        <D_0065>ORDERS</D_0065>
        <D_0052>D</D_0052>
        <D_0054>97A</D_0054>
        <D_0051>UN</D_0051>
      </C_S009>
    </S_UNH>
      <S_BGM>
        <C_C002>
          <D_1001>220</D_1001>
        </C_C002>
        <D_1004>123350</D_1004>
        <D_1225>9</D_1225>
      </S_BGM>
      <S_DTM>
        <C_C507>
          <D_2005>4</D_2005>
          <D_2380>20011107</D_2380>
          <D_2379>102</D_2379>
        </C_C507>
      </S_DTM>

NOTE: Too bad Yahoo strips leading white spaces from the above example :-(

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:
    edi-l-dig...@yahoogroups.com 
    edi-l-fullfeatu...@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
    edi-l-unsubscr...@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

Reply via email to