Pages: 1
Print
Author Topic: TOPLEAF: Creating a "See X" index link  (Read 5740 times)
jlm05
Member

Posts: 79


« on: March 08, 2012, 08:05:53 AM »

In our XMetal DITA, we occasionally include index links to direct users to another index term:

<indexterm>WebSphere Application Server 7<index-see>WAS 7</index-see></indexterm>

Ideally, the TopLeaf output should display this as:

     WebSphere Application Server 7, See WAS 7

With "WAS 7" being a link to the WAS 7 index heading.

However, it's currently coming out as:

     WebSphere Application Server 7WAS 7 43

With the page number the link to the page where the original index entry was set up.

How would we set up the TopLeaf stylesheet to handle this?
Logged
gjn2066
Member

Posts: 60


WWW
« Reply #1 on: March 13, 2012, 09:42:59 PM »

Could you send the stylesheet and a (small) source fragment which illustrates this. It can certainly be done, but I'd need to see the current state of the mappings.
Logged
gjn2066
Member

Posts: 60


WWW
« Reply #2 on: March 21, 2012, 07:50:01 PM »

Should have a response shortly, just working on the XMetaL 7 upgrade to the TopLeaf plugin.
Logged
gjn2066
Member

Posts: 60


WWW
« Reply #3 on: March 31, 2012, 09:00:30 AM »

To correct this problem, I'm incorporating full <index-see> and <index-see-also> support in the XMetaL 7.0 version of the DITAmap stylesheet.

I will email instructions for a temporary workaround to keep you going in the meantime.

Geoff
Logged
jlm05
Member

Posts: 79


« Reply #4 on: June 01, 2012, 11:20:36 AM »

We just completed the upgrade to XMetaL 7 and the new TopLeaf plugin, so I'm revisiting this. I saw the section in the guide about the see and see also entries for indexes, but can't quite figure out exactly what I need to do.

Our stylesheets currently have tags for <index-see> and <index-see-also> that simply take the content of the tags and put it into parentheses. This was our workaround for version 6.

<perl-call sub="extract_terms" copy="content"/>
 (See <content/>)

<perl-call sub="extract_terms" copy="content"/>
 (See also <content/>)

The guide indicates to add parameters to the index-sort element under $document, then refers to adding content for those levels, and also refers to tl:ndx-see and tl:ndex-seealso, but doesn't provide much information otherwise on how to configure it.

I'm just confused as to exactly what content I need to put where in order to get the desired effect.

Thanks,

Janice
Logged
tonys
JustSystems Partner
Member

Posts: 80


« Reply #5 on: June 03, 2012, 06:45:20 PM »

The usual way of handling see and see-also is by allocating a particular index level to each.

The recommendation is to use 8 for see and 9 for see-also. You'll need to change the index-see and index-see-also mappings to generate index items for these levels. Then you can change the index-sort command to use these levels and generate tl:ndx-see and tl:ndx_seealso elements. See "Contents and Index generation" in the User Guide for more information.
Logged
jlm05
Member

Posts: 79


« Reply #6 on: June 04, 2012, 06:37:27 AM »

The guide does not provide enough information. I took an initial stab at it, but the see links are still showing up as plain text - not linked to the other index entry and still displaying a page number.

I added the sort levels to the $document tag:
<index-sort see-level="8" seealso-level="9"/>

I updated index-see and index-see-also to map to index levels 8 and 9 (checkbox on the Content tab).

I added tl:ndx8 and tl:ndx9, but did not do any other configuration for them.

I also didn't add tl:ndx-see and tl:ndx-see-also. I'm guessing they need to be added, but it's unclear what configuration they need to have.

I did not change the custom content for index-see and index-see-also - so it's still grabbing the content and adding the See and See also. I can't tell from the documentation where the actual entry text is supposed to be located and where the "See" and "See also" are supposed to be.


Janice

Logged
tonys
JustSystems Partner
Member

Posts: 80


« Reply #7 on: June 05, 2012, 08:04:09 PM »

Have a look at the generated index file - it's in a folder called "generated" under the partition folder.

If the stylesheet is configured correctly you would expect to see something like this for your data:

Code:
<tl:ndx1><tl:ndxline>
  <tl:title>WebSphere Application Server 7 </tl:title>
  </tl:ndxline>

<tl:ndx-see><tl:ndxline>
  <tl:title>WAS 7 </tl:title>
  </tl:ndxline>
</tl:ndx-see>
</tl:ndx1>

If you're seeing a page number the index sorter doesn't know that level 8 is a "see" entry. Looking at what is actually in the index file will probably point you in the right direction.

Getting the format you want is probably just a matter of generating the ", See" text in the tl:ndx-see mapping.
Logged
jlm05
Member

Posts: 79


« Reply #8 on: June 06, 2012, 07:48:37 AM »

Still can't get it to work. I'm just having trouble figuring out everything I need to configure, and what the configuration needs to be:

index-see and index-see-also - What else do I need to do besides getting the content (as I do for indexterm) and mapping them to level 8 and 9 of the index?

tl:ndx8 and tl:ndx9 - Do I have to add anything special here? Any settings or Custom tab content?

tl:ndx-see and tl:ndx-see-also - What exactly is the configuration? What needs to go on the Custom tab (other than the words See and See also) to get the content from the original index-see and index-see-also tags to display?

I added tl:ndx-see and tl:ndx-see-also tags, with See and See also on the Custom tab, but the one see entry I havedoes not display at all, and the entry in index.xml is not right at all.

Can you provide the additional configuration details so I can try again?

Thanks,

Janice
Logged
tonys
JustSystems Partner
Member

Posts: 80


« Reply #9 on: June 07, 2012, 04:59:42 PM »

See my email response.
Logged
Pages: 1
Print
Jump to:  

email us