Additional Resources

   

This technique is not limited to EDIFACT, X12, and other EDI formats! Far from it ”many applications benefit from being capable of converting between XML and non-XML formats (such as other popular formats or legacy formats). You can use the same technique for the following:

  • Conversion to and from RTF, the Rich Text Format recognized by most word processors.

  • Conversion to proprietary formats such as the fixed-length formats used by mainframes.

  • Conversion to Excel or Lotus 1-2-3 spreadsheets.

  • And more. In fact, provided you can write the formatter, there is no limit to the formats your application can support.

The key to succeed is to properly analyze the output format and XML-ize it, or devise an XML vocabulary that works. The rule of thumb is to keep it simple.

For example, I could have created a more ambitious XML mapping with a different element for each EDIFACT segment, using the EDIFACT element name such as

 <PRI>    <C509>       <S5125>AAA</S5125>       <S5118>24.99</S5118>       <S5375/>       <S5387>SRP</S5387>    </C509> </PRI> 

However, what's the point? It only makes the intermediate format and the formatter more complicated.

Keep it simple. The goal is to move as much intelligence as possible in the XSLT style sheet.

   


Applied XML Solutions
Applied XML Solutions
ISBN: 0672320541
EAN: 2147483647
Year: 1999
Pages: 142

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net