The Overview of a Solution


At the heart of this approach are a number of independent programs that can be used alone or together to build a solution appropriate for the specific problem you need to solve. The programs we will develop in this book are:

  • XML to CSV Converter : Reads and validates an XML document, and writes it out in CSV format

  • CSV to XML Converter : Reads a file in CSV format, produces an equivalent document in XML format, and validates it

  • XML to Flat File Converter : Reads and validates an XML document, and writes it out as a flat file in a user -specified structure (read from another XML file)

  • Flat File to XML Converter : Reads a flat file in a user-specified structure (read from another XML file), writes an equivalent document in XML format, and validates it

  • XML to EDI Converter : Reads and validates an XML document, and writes it out in EDI format according to a user-specified structure (read from another XML file)

  • EDI to XML Converter : Reads an EDI interchange in a user-specified structure (read from another XML file), writes an equivalent document in XML format, and validates it

In addition, we'll rely on an XSLT transformation program to transform between different XML formats. XSLT is the W3C recommendation on Extensible Stylesheet Language Transformations . The good news is that such XSLT utilities are easily (and freely ) available, and we'll use an existing one rather than build one. I will present the essential techniques you need to know to code XSLT stylesheets that drive the transformations between different XML formats.

How does the solution measure up so far against our requirements? As you can easily see, it meets all the functional requirements for technical end users. Because I'll walk you through the coding techniques used in each of the programs, it should help developers meet their requirements too.

Cheap, simple, and easy? You bet. As I said before, you can download some pretty decent XSLT transformation programs for free from the Web. You can download executable versions of the programs developed in this book from the book's Web site. If you want to tweak them a bit or even use them as a basis for your own slightly different programs, you can also download the source code. The solution is very modular, since we use a number of independent programs. It is also maintainable because most of what you have to change to deal with different file organizations is done in XML files rather than in code. The XML to XML transformations are driven entirely by XSLT stylesheets, which are themselves nothing more than XML documents in the XSLT language. XSLT also offers a great deal of portability (as long as you don't use nonstandard extensions!). Other aspects of portability and platform independence are determined more by the specific implementation, so I'll discuss those later.



Using XML with Legacy Business Applications
Using XML with Legacy Business Applications
ISBN: 0321154940
EAN: 2147483647
Year: 2003
Pages: 181

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