<!doctype linuxdoc system>
<article>
<title>
<tt/Edi2SGML/ - an approach towards <tt>XML/EDI</> as a prototype in perl
<subtitle>
release 0.1 - about the beauty of plain text
<author>
Michael Koehne, <tt/kraehe@bakunin.north.de/
<date>
v0.1, Thu Dec 10 05:49:59 1998
<abstract>
Edi2SGML is a set of perl scripts, hopefully becoming a module,
that is translating EDIFACT into SGML. This 0.1 version neither
contains a document type definition for the produced SGML, nor
does it contain a SGML parser to translate its documents back
to EDI. Its intended as a working horse, and I hope that some
diesel or expat, will be able to translate my Edi2SGML to XML/EDI
and vice versa, once we have a standard.
</abstract>
<!-- Table of contents -->
<toc>
<!-- Begin the document -->
<sect>
Introduction
<p>
<tt/EDIFACT/ often called " nightmare of paper less office " once you
show a programmer the standard draft. Those 2700 pages of horror full
advisory board English has cursed many programmers with headaches.
<p>
EDIFACT is trying the impossible: a single form for the real world.
<p>
Orders, invoices, fright papers, ..., always look different, if they
come from different companies. EDIFACT tries to fulfill all needs of
commercial messages regardless of branch and origin. Of course those
99% real world is neither simple nor complete. Nevertheless its
important for the top companies and their suppliers, you know those
who can pay a mainframe and a pack of gurus, and in use since 1995.
<p>
<tt>XML/EDI</> is trying to provide a simpler (KISS) format that can be
translated from and into EDI, to allow smaller companies to avoid
slaughtering forests and retyping stupid lines into a computer
keyboard printed by other computers.
<p>
This is <tt/NOT/ XML/EDI, its certainly not KISS. I would prefer
a <tt><isbn/1565921879/</> for <tt>PIA+5+1565921879:IB</>, but
not
<tscreen><verb>
<additional.product.id>
<product.id.function.qualifier coded="5"/Product identification/
<item.number.identification>
<item.number/1565921879/
<item.number.type coded="IB"/ISBN (International Standard Book Number)/
</item.number.identification>
</additional.product.id>
</verb></tscreen>
<sect>
About the beauty of plain text
<p>
Standards should be based on standards. EDIFACT is based on ASCII and
documentation is available from Premenos as plain text. Well they contain
some funny characters. I took the freedom, to replace them with ASCII
in this distribution to improve readability. I don't talk about human
readability here. A friend at SAP joked that plain paper is the only
platform independent format in that case. But I disliked to retype
them. And plain text is more flexible, as I'm a programmer.
I've included those modified documents, so others can be able to rebuild
the tables also included in this distribution. You may need a Unix like
system because of newline conventions. This current 0.1 version is not
intended to become "installed", just run everything from this path.
<tscreen><verb>
% perl bin/create_codes.pl
% perl bin/create_composite.pl
% perl bin/create_segment.pl
% perl bin/edi2sgml.pl examples/nad_buyer.edi
</verb></tscreen>
You can try other example files, and I really want to read how your
EDI messages look like. Think about the <tt/O'Reilly/ invoice or the
<tt/Dubbel:Test/ and you should catch the clue. I've tried to implement
the <tt/UNA/ right, but this may need some additional debugging. Take
a look at the difference between the edi.tst files from Frankfurt
and the Springer message. The last one is using newline as a 9th
character in UNA, so its nearly human readable.
<sect>
Roadmap
<p>
I plan to use even and odd numbering, so a 0.2 version will be
more debugged, better documented and more looking like a module,
while the 0.3 will contain the next features.
<p>
I plan to add SDBM for faster access on the tables, and some other
minor improvement. The next important step will be a reverse
engineering of the document type definition of the original EDI
standard draft. And of course a DTD for my Edi2SGML also, after
I have looked at those _d.96b files more closely.
<sect>
Download
<p>
I just got a message from PAUSE that I can upload it to :
<tscreen><verb>
$CPAN/authors/id/K/KR/KRAEHE
</verb></tscreen>
You may also get it from my homepage. Try something like:
<tscreen><verb>
http://human.is-bremen.de/~kraehe/pub/Edi2SGML-?.?.tgz
</verb></tscreen>
Be warned its a bit over a megabyte, as it includes the Premenos files
also. The main script is only about 300 lines, so <tt/first dont panik/.
</article>