Chapter 5. Export to Any Format

   

In this chapter and the next , we'll have more fun with XSLT. In the previous chapter, we were syndicating content in a variety of formats. This led us to explore transformations and the XML tool for transformation: XSLT.

Although powerful and effective, the transformations in the last chapter remained in the family because we essentially converted documents from one DTD to another DTD. Although both formats were different, they were based on XML. Yes, we also converted to HTML but, again, XML and HTML are very similar. In this chapter and the next, we'll open the door to more alien formats. Although an explosion in the number of XML-based formats has occurred, many non “XML-based formats are still out there. Some examples include the following:

  • When you publish documents, you might want to convert them to RTF, which is recognized by Word, or PDF, which is Adobe Acrobat's format.

  • If you are active in graphics and design, you probably don't want to throw away existing Adobe Illustrator, CorelDRAW, or CGM files.

  • In electronic commerce, as we will see, legacy formats such as ANSI X12 and UN/EDIFACT need to be supported.

This chapter concentrates on transformation from XML documents to documents in non-XML format; in other words, exporting XML-based documents to other applications. The next chapter is concerned with the reverse operation and discusses how to import non-XML documents in XML applications.

These two chapters build around the same project that is related to e-commerce and, more specifically , with converting EDIFACT documents to and from XML. The two reasons I chose EDIFACT as the typical non “XML-based format are as follows :

  • I'm very familiar with EDIFACT and e-commerce.

  • EDIFACT gives me a chance to demonstrate both sides of the problem. It is common for an e-commerce application to convert to and from EDIFACT, which is not the case with, say, PDF.

However, the techniques introduced in these two chapters are not limited to EDIFACT. As discussed previously, they are commonly used for PDF, RTF publishing. In e-commerce, you might also consider other legacy formats such as X12. Essentially, you need to build such a solution each time an XML application interfaces with a non-XML application.

   


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