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

Posts: 56


« 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: 60


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: 56


« 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: 60


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: 56


« 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: 60


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
palmer@dst
Member

Posts: 56


« Reply #6 on: April 09, 2013, 01:26:54 PM »

I'm revisiting this again, and still not able to get the Index to generate.
  • In the <map> mapping I've put <IndexList/> in the Post-content.
  • I've created a %IndexList custom marker based on the <indexlist> mapping with <skip-leftpage><bookmark level="2">{L-Index}</bookmark><readgen type="index" passes="3"/> in the Pre-content, and Scan element content and Assign to TOC level 1 on the Content tab.
  • On the  tl:ndx mapping, I've added <IndexTitle>Index</IndexTitle> to the Pre-content

... but still no index entries.

A bit lost (again)...

Thanks,

Robert
Logged

rpalmer
DST Systems, Inc.
tonys
JustSystems Partner
Member

Posts: 80


« Reply #7 on: April 10, 2013, 03:13:07 PM »

Are you seeing the "Index" title on an otherwise empty page, or do you get nothing at all?

The debug log should help you find out what is going wrong. You'll need to use the workstation interface to do this - both to make sure debugging is enabled and to access the log.

If you see a title but no index entries, check that the "indexterm" mapping is being called.

If you haven't made a lot of your own changes, I would recommend looking at the new stylesheets that are supplied with the latest version of TopLeaf and also using the latest plugin. The DITAmap stylesheets had quite a few problems, such as the different treatment of map and bookmap.
Logged
Pages: 1
Print
Jump to:  

email us