Home / Articles / Adobe InDesign / Working With Styles, CSS, and XML in Adobe InDesign CS4

Working With Styles, CSS, and XML in Adobe InDesign CS4


  1. Export for Dreamweaver
  2. Styles and XML
  3. Importing XML
  4. XSLT: Styles on Steroids

Chapter Description

InDesign was originally built to create print-based documents, but it now has the ability to export and import XML and export XHTML. But it isn't foolproof. As you'll see in this chapter, InDesign styles are a crucial component of this capability.
XSLT: Styles on Steroids

XSLT: Styles on Steroids

As noted already, XML doesn’t contain, or support, any styling information. Formatting must be applied by another program or by an XML application. One of these applications was created specifically for XML. It’s called Extensible Style Sheet Language Transformation (XSLT), and it not only enables you to format text within an XML file, but also to create and format structural elements. XSLT can apply CSS styling and convert the XML file into something completely different, such as a Web page, a text file, a completely different XML file, or even a PDF!

Adobe added an XSLT feature in InDesign CS3. You can apply XSLTs on both import and export. The feature is so powerful that you’ll be limited more by your imagination (and your ability to write XSLTs) than by the technology.

You can use XSLT to reorganize or sort the content of an XML file by various criteria, such as price, title, and author name. And on export, you can use XSLT to generate instant Web pages (FIGURE 10.20).

Figure 10.20 An XSLT can be applied while importing and exporting XML. Here the content of the flyer is exported, and a Web page is generated with a few clicks of the mouse.

This chapter has only scratched the surface of all you can do with XML in InDesign. For a complete hands-on guide to the features and capabilities, check out A Designer’s Guide to Adobe InDesign and XML by James J. Maivald and Cathy Palmer (Adobe Press, 2008).