Gosh! It never entered my mind that Matthew Kiley was suggesting that
*everything* be "flattened" out in the XML message, with header
information *repeated* for each detail line! That would entail a most
egregious lack of normalization.

I just thought Matthew might be wondering whether the sequence of 1..n
detail OrderLines should be ensconced (and pushed down in the hierarchy)
in their own "Detail" element, with "Detail" placed on an equal footing
with other header information like BuyerParty and SellerParty.
Apparently, the designers of UBL must've felt that the sequence of 1..n
detail OrderLines (the "detail") are equal citizens, as far as the
"Order" document is concerned, to "header" stuff like BuyerParty. From
an XML point of view, I can't imagine any advantage doing it either way;
it seems that XSLT or Xpath would be able to access stuff with equal
facility.

William J. Kammerer
Novannet, LLC.
Columbus, OH 43221-3859 . USA
+1 (614) 487-0320

----- Original Message ----- 
From: "Chris Johnson" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Thursday, 27 January, 2005 07:16 AM
Subject: Re: [EDI-L] XML Hierarchy Question



Quoted text is from <[EMAIL PROTECTED]>, by
William J. Kammerer <[EMAIL PROTECTED]>

>Great question!  Generally, hierarchy is good, as Messrs. Wertheimer,
>Johnson  and Chessman acclaim.  But in this case, I kind of feel that
>the "detail" should be at the same level as the "header," if I'm
>understanding you correctly.  In good ol' soon-to-be-sunsetted
>Trad*EDI, this is true: Table 1 (the header) is considered to be at the
>same "level" as Table 2 (the detail).  The PO1 loop in the 850 PO is
>(implicitly) nested  at the same level as typical header information
>like the N1 Buyer loop.

Yes, but consider what you would do if you wanted to process the
information in the 850 to a flat file for import into MS Excel. You
would search out all the information you wanted at the ST level and
write it to a record, then you would loop through the N1's and pick out
what was relevant to you from each instance and append it to the record;
forming a superheader, which you would remember. For each PO1 you would
pick out what you wanted, append it to the superheader and write it out
as a record.

The advantage is that every record, which pertains to a detail line, has
all the header information associated with it on the same record. The
disadvantage is that you have an awful lot of repetition in your file.

Loops in hierarchical structures act in the same way as tables in a
database; it is just that you use physical position in the hierarchy to
relate it to other 'tables' rather than keys.

Regards
Chris
-- 
Chris Johnson  mobile:+44 (0)7785 302122
EDIMatrix Ltd  work: 0845 126 0680 or +44 20 8559 2454
                fax:  +44 (0)20 8559 2497
EDI website    http://www.edimatrix.co.uk




.  
Please use the following Message Identifiers as your subject prefix: <SALES>, 
<JOBS>, <LIST>, <TECH>, <MISC>, <EVENT>, <OFF-TOPIC>
Access the list online at:  http://groups.yahoo.com/group/EDI-L
 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/EDI-L/

<*> 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/
 



Reply via email to