Pages: 1
Print
Author Topic: TopLeaf: map.dtd does not generate Index with DITAmap-Template  (Read 359 times)
palmer@dst
Member

Posts: 35


« on: July 25, 2011, 10:33:04 AM »

Content marked with <indexterm> does not convert into index entries using the DITAmap-template in TopLeaf if the dita map is using the map.dtd (as opposed to the bookmap.dtd). No index is generated at all for maps using map.dtd.

In a bookmap.dtd, the <indexlist> is generated, and TopLeaf if using <indexlist> to kick off the perl script to build the index. <indexlist> does not get generated with map.dtd, so not sure what should be used to kick off the perl script.

(When the XMetaL Enhanced PDF via Renderx XEP ouput is selected (not TopLeaf) for a map.dita file, an Index is generated without the use of <indexlist>, so not sure how that's done, and if it would be similar to getting an Index for a dita.map in TopLeaf...)

What's the fix?

Thanks,

RP
« Last Edit: July 25, 2011, 01:35:48 PM by palmer@dst » Logged

rpalmer
DST Systems, Inc.
gjn2066
Member

Posts: 47



WWW
« Reply #1 on: August 29, 2011, 06:39:57 PM »

Hmmmmm, I'll try this myself and get back to you.
Logged
palmer@dst
Member

Posts: 35


« Reply #2 on: September 12, 2011, 10:15:34 AM »

It's not valid DITA, but I found that if I insert <indexlist/> before the closing </map>, an Index is generated based on the <indexterm>s throughout the DITA Map's topics when using the map.dtd. There's no heading for it in the TOC however, but the Index is complete and accurate.

This also works for <figurelist/> when the additional %FigureListEntry markers etc. are added (per Murray's recipe).

It's a possible workaround, but would prefer automatic generation of the Index without having to make the DITA Map invalid.

RP
Logged

rpalmer
DST Systems, Inc.
gjn2066
Member

Posts: 47



WWW
« Reply #3 on: September 19, 2011, 11:06:34 PM »

You've almost got it. While you can't/shouldn't put an invalid <indexlist/> element in the source, you can/should put an <IndexList/> custom marker in the map mapping Post-content.

All you need do then is create the %IndexList mapping based on (ie. copied from) the indexlist tag mapping.

You can then modify tl:ndx to generate a ToC entry.
« Last Edit: September 19, 2011, 11:08:12 PM by gjn2066 » Logged
palmer@dst
Member

Posts: 35


« Reply #4 on: January 10, 2012, 03:34:33 PM »

Quote
You can then modify tl:ndx to generate a ToC entry.

How exactly is that done on the tl:ndx Content tab? I've selected Scan element content, then selected Assign to TOC level (2), and Set Target ID from attribute (id), and then regenerated, and the entire Index, all entries/terms, appears in the TOC. Do I need to set something on the tabs for %IndexList as well?

Thanks!

RP
Logged

rpalmer
DST Systems, Inc.
gjn2066
Member

Posts: 47



WWW
« Reply #5 on: January 10, 2012, 06:16:52 PM »

Basically whatever you scan goes into the ToC. So if you scan the whole index, then that's what you get.

What you need to do is to just scan the word Index. This is where Custom Markers come in. As you know a CM is simply an XML "element" defined on the fly during the typesetting, and which can be used in the Pre/Post-content of normal elements.

So in your tl:ndx Pre-content just add the following:

    <IndexHead>Index</IndexHead>

then define your %IndexHead mapping to scan and assign to ToC.

Note that while a CM can have its own Pre/Post-content, in this case you can't simply say <IndexHead/>, since there is then no content to scan/assign.

Note that if you already have a CM for creating ToC entries, you can use this instead of IndexHead.
« Last Edit: January 10, 2012, 06:19:17 PM by gjn2066 » Logged
Pages: 1
Print
Jump to:  

email us