Atomik Xport SE: Tutorials > Chapter 5 Tutorial 3: Atomik Xport Tools << >>

5.2 Associating captions with images

In our InDesign document, you will find that images are not grouped with their respective captions, producing undesirable results in the XML. For instance, the picture box containing the Coit Tower on page 2 has been extracted with the caption ‘Above: The Las Vegas Strip‘ as its sibling.

In this stage of Tutorial 3, we will use the Xport Tools to associate each caption with its image, thereby ensuring they appear as matched sibling elements in the extracted XML.

To associate a caption with an image, we need to multi-select the two boxes:

  1. Make sure you are using InDesign’s direct selection tool.
  2. On page 2, select the text-box containing the caption ‘Above: The Las Vegas Strip.‘
  3. Press the ‘Shift’ key and select the image box above the caption.

Once you have an image and an caption box multi-selected, you will find that the relevant icons on the Xport Tools palette are enabled.

  1. Press the first icon on the Xport Tools palette. The image and the caption will be associated.

Note: once the association is made, in addition to the ‘Associate Caption with Image’ icon, two other icons in the Xport Tools palette become enabled: ‘Jump to Caption’ and ‘Remove Caption Association’.

  1. Repeat this process with other images that have captions in the layout.

Once you have completed associating images with captions, you can view the associations as follows:

  1. 6 From the Window menu select ‘Xport Image Captions’

This palette will list all the images that have associated with captions or copyright text. If you have associated all captions, you will find four images listed.

  1. Select the first image in the list, named ‘LasVegas_Strip.jpg‘

You will notice the caption text for the image is now displayed below the list. The caption text indicates that it refers to the image ‘Above’. This may not be relevant when you repurpose your data, so we are going to trim the associated caption text to remove the word ‘Above’.

  1. Click the ‘Trim Caption’ icon below the ‘Associated Caption’ text:

Trim Caption icon

The Trim Caption dialog will appear displaying the caption.

  1. Select the text that you wish to appear as the image’s caption.

9. Click the ‘Trim’ button.

The caption is now listed with the text ‘Above:’ removed.

10. Open the XML Preview and extract the XML using the Tutorial3 ruleset.

If you explore the XML tree view (remember: Alt + Click to fully expand the tree), you will find that images appear together with their associated captions, in the Graphic element.