Exporting Index Data from STEP

After all InDesign documents for a publication have been finalized and saved back to STEP, data about the mounted products and the pages on which they appear can be exported from the publication in order to generate an Alphabetical Index - XML file. This XML file format is used to create both types of indexes—the basic 'stock number' index and the more advanced 'alphabetical index.'

If building an alphabetical index, index words are required. This topic assumes that you have already created your index words and index words hierarchy and linked them to the products in your publication. Refer to the Creating an Index Words Structure topic here for more information.

This topic describes how to export an Alphabetical Index - XML file from a publication in STEP using standard STEP Export Manager functionality. By using the Export Manager, you can define, through mapping, which index words and/or STEP attribute(s) to include in the index output; how to sort the exported data (for example, what country, language, or numerical order should be used to sort); and what separator characters should be placed between multiple page numbers and/or page ranges (such as 1, 2 or 1-3).

The exported index will organize the index entries into XML tag structures, such as:

<Level1>
<Word>Laser Printer</Word>
<PageNumber>2,5-6</PageNumber>
</Level1>

Note: This topic assumes a basic familiarity with the STEP Export Manager. For full details on Export Manager functionality, refer to the Export Manager section of the Data Exchange documentation here.

Exporting an Index Using the STEP Export Manager

  1. In the workbench, navigate to File > Export > Data to launch the Export Manager. Select Create New Export, then click Next. Alternatively, you may right-click on the publication from which you want to export the index and click Export Data Below.

  1. In step 2 (Select Objects), define the publication from which you would like to export the index. Click Add Objects, search for or browse to the relevant publication in the Select Objects dialog, then click Select.

  1. Select Product from the 'Export' dropdown list.

Note: It does not matter if 'Only export leaf objects' is checked. Since the export will be in XML format, this option is ignored.

  1. In step 3 (Select Format), choose Alphabetical Index - XML from the dropdown list.

  1. Configure the remaining options in step 3 as follows:
  • Sort Language Code: This is a free-text field. Enter the two-letter lowercase ISO 639-1 language code on which you would like to sort the index words. The default selection is en. A full list of codes can be found on the web.
  • Sort Country Code: This is a free-text field. Enter the two-letter uppercase ISO-3166 country code on which you would like to sort the index words. The default selection is US. A full list of codes can be found on the web.
  • Page Number Separator: This defines what character should be placed between page numbers if a product appears on more than one page in the publication. This is typically a comma with a space added after.
  • Page Range Separator: This defines what character should be placed between page numbers if a product appears on more than one consecutive page. This is typically a hyphen with no space on either side.
  • Use Numerical Sort: Select yes to sort numerical entries in ascending numerical order:
  • 100
  • 200
  • 1002345
  • 1003456
  • 2001234

Select no to sort numerical entries on the first number, as follows:

  • 100
  • 1002345
  • 1003456
  • 200
  • 2001234
  1. Click Next to move to step 4, Map Data.

Mapping Index Data

The next step in configuring the index export is to map the data, which occurs in step 4 of the Export Manager, Map Data.

All indexes must contain at least two elements—an index word and a page number.

Page number is not mapped as an attribute, since page numbers are automatically populated from InDesign pages after they are saved to STEP.

Mapping a Basic Stock Number Index

The index word in a basic stock number index is typically a part number or a catalog number. This can either be an attribute, a STEP ID, or a STEP name. For this example, the STEP ID will be used as the index word.

  1. On the Map Data screen of the Export Manager (step 4), select <ID>, then click on the arrow directly to the left of the Index words flipper.
  2. Expand the <ID> flipper to display the Sort Word Path and Word Path. Leave these as-is.

Sort Word Path denotes the content that the Index is sorted by—in this case, the ID of the products. Word Path is the content that is actually being pulled into the index—in this case, also the ID of the products.

  1. Select <Page Number>, then click on the arrow directly to the left of the Page Number flipper. Click Next.

  1. To complete the export of the stock number index, refer to the last section in this topic, 'Completing the Index Export'.

Mapping an Alphabetical Index

Mapping an alphabetical index is more in-depth than mapping a basic stock number index, as more considerations are made for index words and translated content.

The index words in an alphabetical index are pulled from the index words that are linked to the products mounted to the InDesign pages.

  1. On the Map Data screen of the Export Manager (step 4), expand the Index Words hierarchy and select the relevant index hierarchy.
  2. Click the arrow directly to the left of the Index words flipper.
  3. Expand the Index words flipper
  4. Expand the Word flipper to display the Sort Word Path and Word Path. The number in front of Word is the STEP ID of the selected index word hierarchy.

Sort Word Path denotes the content that the Index is sorted by—in this case, the sort word attached to the index words. Word Path is the content that is actually being pulled into the index—in this case, the actual index words in the hierarchy. Refer to the Creating an Index Words Structure topic here for more information on sort words.

  1. If your index will contain translated content, it is recommended to map a constant value in order to generate top-level index letters—1, 2, 3, A, B, C, and so forth. For example, in English, a product named 'Black chair' would be listed under the letter B, but in Germany, the same product would be named 'Schwarz stuhl' and would need to be listed under the letter S. This enables you to use a single dimension-dependent index words hierarchy that is translated instead of having a separate hierarchy for English, a separate hierarchy for German, and so forth.

If there is no chance that the contents of your publication will be translated, it is acceptable to not map a constant and instead use letters as the Level 1 index word, as shown throughout the Creating an Index Words Structure topic here.

  1. Select "Constant Value" under Map Data, then click the arrow to the left of Word Path.

  1. On the Enter Value dialog that displays, enter the string <pathsep/>, then click Save.

The constant <pathsep/> is used to identify each individual index letter and ensures that the same index letter is only shown once.

  1. Next, the index hierarchy must be mapped to the Word Path again. The first mapped index will be used to extract the index letters from the index words through a transformation (refer to step 10). The second mapped index will be used to extract the index words themselves.

Select the relevant index hierarchy again from beneath Map Data, then click on the arrow to the left of Word Path to map the index hierarchy a second time.

  1. Next, a transformation must be applied to the first mapped Index hierarchy to extract the first letter of each index word. This letter will be used as the index letter when a new letter begins in the index.

Click on the transformations icon to the right of the first Word Path field to display the Transformations dialog.

  1. Click 'Add Transformation' to display the Select Transformation dialog.
  2. Select 'Extract characters at position' from the list of transformations. Click OK to return to the Transformations dialog.

  1. Enter a '1' in both the 'Starting from position' and 'extract' fields, then click Save.

  1. Last, map the Page Number by clicking <Page Number> and clicking the arrow next to Page Number, then click Next.

Completing the Index Export

Once you have completed your index mappings, follow these steps to complete the index export from STEP. The following steps describe basic Export Manager functionality and are not unique to the Alphabetical Index - XML format.

  1. After clicking Next on the Map Data screen of the Export Manager (step 4), you are taken to the Advanced screen (step 5). All options may be left as-is. Click Next.
  2. On the Select Delivery Method screen (step 6), choose File from the dropdown, then click Finish
  3. On the Save Export Configuration dialog, select 'Save Options' to save the Index Export configuration, which is recommended. Click the ellipsis button () by the Save to window and choose a classification folder in which to store your export configuration. A typical location is Configurations > Export Configurations.

Note: For more information on saving export configurations, refer to the Running a Data Export section of the Export Manager documentation here.

  1. Click OK to begin the Export Process, then click Go to Process to go to the BGProcesses tab and retrieve the file once the export is completed. The file is exported as XML.
  2. Save the XML file to a location of your choosing on your hard drive.

Once these steps are completed, the XML file is ready to be formatted and imported into InDesign. For instructions on next steps, refer to the Formatting and Mounting an Index in InDesign topic here.