I want to upgrade our university's graduation book using InDesign instead of an ancient version of FrameMaker. Each student is listed in the book with their name, major, minor, thesis title, etc. At the end of the book is an index with each student's name. The data for the book is in an XML file, and I know how to import the XML and use tags, styles, etc. to format it. However, I'm struggling to figure out how to create the index entries.
The XML file already includes a tag for index name, e.g.:
<STUD_NAME>Jennifer Gabrielle Smith</STUD_NAME>
<INDEX_NAME>Smith, Jennifer G.[SMITH, JENNIFER GABRIELLE90210]</INDEX_NAME>
<STUD_TITLE>This is the student's thesis title</STUD_TITLE>
What is the best method for changing the content within the <index_name> tag (except for what's in straight brackets) to an index entry? Obviously it's not practical to hand-tag thousands of students. Do I have to use a script, or is there some other simpler way?
Your example seems more of a table of contents, than an index.
Will it look like this?
Smith, Jeff p250
Smith, Jennifer p251
Smith, John p252
If yes, then use a unique paragraph style applied to your Index name entries, and then use the Table of Content tool to generate the list.
Thanks, Jeffrey. Close, but not quite. Table of Contents doesn't alphabetize the listings, nor does it include references to multiple pages for the same student. For example, Jennifer Smith might have a double major and be listed twice, on p251 and p17, so the entry should look like:
Smith, Jennifer 17, 251
That is indeed the perfect script, thanks so much!