We are having the same issue and haven't been able to find a solution. Ideally we would like to import the XML into an InDesign layout with XML markup that would be interpreted by InDesign as an index item and would then create the appropriate index term. Does anyone know if this type of XML feature is supported?
We also are looking for this exact feature, I'd be very surprized that it doesn't exist.
The xml we imported had markers like this:
<title id="1001">ABC BOOK</title>
<title id="1002">123 Book</title>
We'd like to generate some prety complex issues, and just need to know what page each title is on, and ideally we'd like to know the id.
The only way I've found to do this is to bring in the index entries as hidden text, then run a script which finds all such, adds an index entry directly before it, and then changes the markup to indicate that that entry has been indexed.
Any chance you can post some examples or references on how to write such scripts?
Hidden text? I wouldn't do it that way at all.
Why not simply import the XML into InDesign, such that InDesign tages the text in question with the XML tags that represent index markers. Then, write a script to iterate over all XML tagged InDesign content and check if the tag name matches your index marker; if it does, create an index marker. If not, skip it and move on.
InDesign's built-in XML workflows are not mature, so set your expectations appropraitely. Expect to have to add on scripts or translations to "make it go."