Index Ancestor Page Numbers not shown

<oXygen/> general issues.
RGP_Dita
Posts: 4

Index Ancestor Page Numbers not shown

Tue Nov 03, 2015 1:37 pm

Hi,

I have a question about how the page numbers are shown in the pdf index for a BookMap.

I have a Topic with this prolog:

Code: Select all

<prolog>
  <metadata>
   <keywords>
    <indexterm>Info</indexterm>
   </keywords>
  </metadata>
 </prolog>



And a sub-topic with this:

Code: Select all

<prolog>
  <metadata>
   <keywords>
    <indexterm>Locale</indexterm>
    <indexterm>Info<indexterm>Locale</indexterm></indexterm>
   </keywords>
  </metadata>
 </prolog>


This is how my Index appears:

Code: Select all

Info
      Locale 17



My question is: how can I get a page number to appear for the Main Topic, too?
Have I misunderstood how to use the indexterm nesting?

Thank you in advance
Radu
Posts: 5752

Re: Index Ancestor Page Numbers not shown

Tue Nov 03, 2015 2:53 pm

Hi,

About this question:

My question is: how can I get a page number to appear for the Main Topic, too?


It should work, if you look in the index page under the letter L you should find a link to your parent topic.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
RGP_Dita
Posts: 4

Re: Index Ancestor Page Numbers not shown

Tue Nov 03, 2015 3:07 pm

Hi Radu,

thank you for your rapid response.

Yes, there is an entry under L for Locale, but for me this is the sub-topic.

What I want is for "Info" in my example to have a page number. I understand that no pn will be generated from the sub-topic for Info, but I would expect that the standalone Indexterm for Info would generate one.

What I am trying to achieve is that from the index one can go directly to "Info" and also directly to "Info, Locale".

I hope this is more clear,

thank you in advance
Radu
Posts: 5752

Re: Index Ancestor Page Numbers not shown

Wed Nov 04, 2015 11:44 am

Hi,

Sorry, initially I did not understand what you wanted although you were quite clear.
I will add an issue for this and try to find some time to look into the problem.

I also tested publishing to PDF installing and using the commercial RenderX XEP processor:

https://www.oxygenxml.com/doc/versions/17.1/ug-editor/index.html#topics/dita-pdf-select-processor-transform-documents.html

and it produced in the PDF the link to the page also for the parent indexterm, in our case the Info term.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Radu
Posts: 5752

Re: Index Ancestor Page Numbers not shown

Wed Nov 04, 2015 3:53 pm

Hi,

I opened an issue for this with a possible fix suggestion on the DITA OT issues list:

https://github.com/dita-ot/dita-ot/issues/2126

Are you comfortable with making those XSLT changes on your side? Do you use a custom DITA Open Toolkit installation or are you publishing using Oxygen's default capabilities (DITA Open Toolkit bundled with Oxygen)?

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
RGP_Dita
Posts: 4

Re: Index Ancestor Page Numbers not shown

Wed Nov 04, 2015 4:53 pm

Hi Radu,

thank you again for the speedy response and your work on this.

We are using a standard Oxygen setup at the moment, but we have not been using the application long.

I am not experienced in this yet, but if I understand correctly, what you are proposing is:

1. Copy the index.xsl file to the Customization folder;

2. Insert the line "<xsl:with-param name="idxs" select="opentopic-index:refID"/>" in the appropriate place.

If this is correct I will try this when I get an opportunity.

Thanks again
Radu
Posts: 5752

Re: Index Ancestor Page Numbers not shown

Thu Nov 05, 2015 12:19 pm

Hi,

Just to see if this works you could try to make the change directly to the original index.xsl.
Indeed if that solves your problem you could also try to overwrite the template from your DITA customization folder.
In that customization folder you have a "custom.xsl" stylesheet in which you could add a modified version of the original XSLT template from the index.xsl. Just copying stylesheets to the customization folder does not imply the fact that they will be used. The only used XSLT is the "custom.xsl" but in turn it can have references to other stylesheets.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
RGP_Dita
Posts: 4

Re: Index Ancestor Page Numbers not shown

Fri Nov 06, 2015 4:30 pm

Hi Radu,

I tried as you suggested (amending the index.xsl directly in the first instance) and it worked up to a point - maybe too well, in fact.

The result now is:

Code: Select all

Info 18,18
      Locale 18


I.e. one for the Indexterm for Info, and one also for the Indexterm Locale, with ancestor Info.

Looking at the xsl on the repository, it seems that the base index.xsl that I have is not the same as the one there. E.g. this is missing from my version:

Code: Select all

<xsl:variable name="markerName" as="xs:string"
       select="concat('index-continued-', count(ancestor-or-self::opentopic-index:index.entry))"
    />


I guess I need to get an updated version of this file.

regards
Radu
Posts: 5752

Re: Index Ancestor Page Numbers not shown

Mon Nov 09, 2015 12:34 am

Hi,

Indeed the XSLTs used on the DITA Open Toolkit 2 GitHub develop branch to generate the index page (the index.xsl and index_fop.xsl) have been changed quite a lot from the DITA OT 1.8 equivalent XSLTs. But I think the same solution should work in both cases.
At the same time, if you have two consecutive small topics which fit in the same PDF page and they both define the same index term (which is probably your case), indeed you might obtain that index term with two links to the same page. Unfortunately as Apache FOP does not have special support for indexing, this cannot be helped. When RenderX XEP is used, special indexing support in the engine can be used to avoid this problem if duplicate links to the same page from the same index term.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

Return to “Other Issues”

Who is online

Users browsing this forum: No registered users and 1 guest