DITA and XMetaL Discussion

XMetaL Community Forum DITA and XMetaL Discussion TopLeaf: map.dtd does not generate Index with DITAmap-Template

  • [email protected]

    TopLeaf: map.dtd does not generate Index with DITAmap-Template

    Participants 6
    Replies 7
    Last Activity 11 years, 8 months ago

    Content marked with 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 is generated, and TopLeaf if using to kick off the perl script to build the index. 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 , 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

    Reply

    gjn2066

    Reply to: TopLeaf: map.dtd does not generate Index with DITAmap-Template

    Hmmmmm, I'll try this myself and get back to you.

    Reply

    [email protected]

    Reply to: TopLeaf: map.dtd does not generate Index with DITAmap-Template

    It's not valid DITA, but I found that if I insert before the closing , an Index [u]is generated[/u] based on the 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 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

    Reply

    gjn2066

    Reply to: TopLeaf: map.dtd does not generate Index with DITAmap-Template

    You've almost got it. While you can't/shouldn't put an invalid [u]element[/u] in the source, you can/should put an [u]custom marker[/u] 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.

    Reply

    [email protected]

    Reply to: TopLeaf: map.dtd does not generate Index with DITAmap-Template

    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

    Reply

    gjn2066

    Reply to: TopLeaf: map.dtd does not generate Index with DITAmap-Template

    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:

       Index

    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 , 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.

    Reply

    [email protected]

    Reply to: TopLeaf: map.dtd does not generate Index with DITAmap-Template

    I'm revisiting this again, and still not able to get the Index to generate.

    • In the
      mapping I've put in the Post-content.
    • I've created a %IndexList custom marker based on the mapping with {L-Index} 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 Index to the Pre-content

    … but still no index entries.

    A bit lost (again)…

    Thanks,

    Robert

    Reply

    tonys

    Reply to: TopLeaf: map.dtd does not generate Index with DITAmap-Template

    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.

    Reply

  • You must be logged in to reply to this topic.

Lost Your Password?

Products
Downloads
Support