When exporting XML from the flyer earlier, the process began with a file that had styles but no XML tags applied. The Map Styles to Tags dialog applied the XML tags to the content using the existing paragraph and character styles as markers. When importing XML, the XML file contains tags but no styles. FIGURE 10.18 shows a template with the boilerplate copy stripped out but with the tagged text frames left behind. It will clearly demonstrate what kind of magic is possible in an XML workflow. With a few clicks of the mouse, the pretagged frames will be populated with text, images, and price information. Then with a few more clicks, the layout will be completely formatted. It doesn’t get much easier than that.
Figure 10.18 Although they’re empty, the text frames in the layout exhibit the colorful evidence of XML tagging.
In FIGURE 10.19 you can see side by side the results of the import process:
- From the File menu or the Structure panel menu, choose Import XML.
- Browse to the XML file and click Open.
- For this type of workflow, deselect all check boxes in the XML Import Options dialog and then click OK.
- Choose Map Tags to Styles from the Tags panel menu or Structure panel menu.
- Choose matches manually from the drop-down menus, or click the Map by Name option.
The data flows into the pretagged areas of the layout. One of the amazing properties of importing XML is that a piece of data will only enter a frame properly tagged for it.
This matches the incoming XML information with the character and paragraph styles already existing in the template, and styling is instantly applied.
The neat thing is that this process works the same way whether it’s a one-page flyer like this or a thousand-page book. Although this capability is great as is, another feature would be the ability to automatically map object styles, too.
Figure 10.19 Unformatted XML content imported into an InDesign template (left) becomes instantly formatted by mapping tags to styles (right).