Understanding the XSL Transformation Files

When you examined the contents of the Shippers.xml document earlier in this chapter you may have noticed that the file did not contain any formatting instructions. Although it is easy to display the XML file in the browser, end users expect to see documents nicely formatted. To meet their expectations, the raw XML data is formatted with the Extensible Stylesheet Language (XSL).

When you exported the Shippers table to XML and selected the Presentation of your data (XSL) check box in the Export XML dialog box (see Figure 29-2 earlier and step 5 in Hands-On 29-1), Access generated an XSL file. Extensible Stylesheet Language is a transformation style language that uses XSL Transformations (XSLT) to create templates that are applied to the source document data to create the target document. The target document can be another XML document, an HTML page, or even a text-based file.

XSL files include all the XSLT transforms that are needed to define how the data is to be presented. Transformations allow you to change the order of elements and selectively process elements. Later in this chapter you will learn how to create XSL files with XSLT transforms to display only selected fields from the Access-generated XML documents. There is no limit to the number of stylesheets that can be used with a particular XML document. By creating more than one XSL file, you can present different formats of the same XML document to various users.

0 0

Post a comment