Chapter 5. Looking Forward: InDesign as an XML “Skin”

If you have a number of XML documents, all based on the same tags, you can make them look completely different just by using a different style mapping and page layout.

For example, say that in template A.indt, you have three columns, justified text, with Caslon Old Style as the base font. In template B.indt, you have a single-width column of left-aligned text with a narrow sidebar and Helvetica as the base font. In each template, you have mapped the XML tags to paragraph and character styles of the same name (but different definitions) and applied tags to text flows. By importing the XML of the same tag structure into the different InDesign templates, you will get completely different-looking documents.

The power of this technique is only beginning to be appreciated. It is held back by the fact that there is so little standardization of XML that people use in InDesign. I expect that the next development will be the introduction of XML standard tag sets (DTDs) for publications that are rich enough to describe information usefully, but not so deeply that they are difficult to use. Using standardized XML content models will provide the basis for increased automation with XSLT on import and export of XML.

If you want to explore this concept now, it is easy to try out:

  1. Create an InDesign template (.indt) with styles, column layout, and so on that you like.

  2. Use an XML file as the basis to create placeholder content with the tags you want ...

Get XML and InDesign now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.