DITA-OT with PDF with XEP indices
Here should go questions about transforming XML with XSLT and FOP.
-
- Posts: 19
- Joined: Thu Mar 29, 2012 4:45 pm
DITA-OT with PDF with XEP indices
I've got an issue with the index ouput.
I have a topic which defines:
<indexterm>frequency plot</indexterm>
and another that defines:
<indexterm>frequency plot<indexterm>grouped</indexterm></indexterm>
The generated output is:
frequency plot 70–71, 97
grouped 97
Basically the grouped frequency plot page numbers are output for the parent index term too. I saw a method of omitting the page numbers from the parent term using <xsl:with-param name="no-page">true</xsl:with-param> in the index_xep.xsl. However, this excludes all references on the parent term. I just wanted to exclude the page number for the term that is a descendent (page 97).
Anyone have any ideas how to omit the page numbers for the nested term? I presume these are been built somewhere higher up the chain.
I have a topic which defines:
<indexterm>frequency plot</indexterm>
and another that defines:
<indexterm>frequency plot<indexterm>grouped</indexterm></indexterm>
The generated output is:
frequency plot 70–71, 97
grouped 97
Basically the grouped frequency plot page numbers are output for the parent index term too. I saw a method of omitting the page numbers from the parent term using <xsl:with-param name="no-page">true</xsl:with-param> in the index_xep.xsl. However, this excludes all references on the parent term. I just wanted to exclude the page number for the term that is a descendent (page 97).
Anyone have any ideas how to omit the page numbers for the nested term? I presume these are been built somewhere higher up the chain.
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: DITA-OT with PDF with XEP indices
Hi,
I created a small sample DITA project based on your suggestions, set the "clean.temp" parameter to "no" in the transformation scenario and published to PDF using XEP.
Then I opened the "topic.fo" file from the transformation temporary files folder.
I searched in it for the frequency plot: index term. At the end of the FO file where the index page is built, there is a reference like this:
so the enumerated list of pages is built by XEP by looking in all places where the index key "frequency plot:" is defined.
In my original DITA topic I had an index term like this:
which got converted in the topic.fo to something like this:
So an index key is defined for the "frequency plot:" even though it is generated from a parent index term.
In the XSLT stylesheet DITA-OT-DIR\plugins\org.dita.pdf2\xsl\fo\index.xsl there is a template which creates all these inline index-key definitions:
Maybe you could change that template to avoid generating key definitions for index entries which have child index entries, something like this:
By the way, this recent DITA OT 2.x fix adds proper indentation for the nested index term:
https://github.com/dita-ot/dita-ot/issues/1525
Regards,
Radu
I created a small sample DITA project based on your suggestions, set the "clean.temp" parameter to "no" in the transformation scenario and published to PDF using XEP.
Then I opened the "topic.fo" file from the transformation temporary files folder.
I searched in it for the frequency plot: index term. At the end of the FO file where the index page is built, there is a reference like this:
Code: Select all
<fo:index-page-citation-list>
<fo:index-key-reference color="blue" font-style="italic"
page-number-treatment="link" ref-index-key="frequency plot:"/>
</fo:index-page-citation-list>
In my original DITA topic I had an index term like this:
Code: Select all
<cmd>Remove the<indexterm>frequency plot<indexterm>grouped</indexterm></indexterm> old oil filter.</cmd>
Code: Select all
<fo:block>Remove the<fo:inline index-key="frequency plot:"/><fo:inline
index-key="frequency plot:grouped:"/> old oil filter.</fo:block>
In the XSLT stylesheet DITA-OT-DIR\plugins\org.dita.pdf2\xsl\fo\index.xsl there is a template which creates all these inline index-key definitions:
Code: Select all
<xsl:template match="opentopic-index:index.entry">
<xsl:for-each select="opentopic-index:refID[last()]">
<fo:inline index-key="{@value}"/>
</xsl:for-each>
<xsl:apply-templates/>
</xsl:template>
Code: Select all
<xsl:template match="opentopic-index:index.entry">
<xsl:if test="not(opentopic-index:index.entry)">
<xsl:for-each select="opentopic-index:refID[last()]">
<fo:inline index-key="{@value}"/>
</xsl:for-each>
</xsl:if>
<xsl:apply-templates/>
</xsl:template>
https://github.com/dita-ot/dita-ot/issues/1525
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 150
- Joined: Fri Apr 24, 2015 12:28 pm
Re: DITA-OT with PDF with XEP indices
Hi Radu,
I have the same "issue", tried out your suggestion, but we are currently evaluating Antenna House - and Antenna House seems to not like it.
It seems that the parent entries cannot be resolved properly. The error that is returned is 'Unresolved index-key value: "frequency plot:"'
Interestingly, the PDF output shows the wanted result.
Any ideas how this could be done differently? If not, I'm going to ask in the DITA user group.
Thanks and regards,
Christina
I have the same "issue", tried out your suggestion, but we are currently evaluating Antenna House - and Antenna House seems to not like it.
It seems that the parent entries cannot be resolved properly. The error that is returned is 'Unresolved index-key value: "frequency plot:"'
Interestingly, the PDF output shows the wanted result.
Any ideas how this could be done differently? If not, I'm going to ask in the DITA user group.
Thanks and regards,
Christina
oXygen XML Editor 25.1 build 2023070306
DITA OT 3.7.4
DITA OT 3.7.4
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: DITA-OT with PDF with XEP indices
Hi Christina,
Sorry for the delay, you did well to write about this on the DITA Users List, there are people from Antenna House registered on it.
If you do not get an answer for it please update this forum thread and I'll try to get someone from Antenna House answer it. From what I know Antenna House also has a special DITA OT PDF plugin so they might want you to consider using it to produce the PDF as it works better with their engine.
Regards,
Radu
Sorry for the delay, you did well to write about this on the DITA Users List, there are people from Antenna House registered on it.
If you do not get an answer for it please update this forum thread and I'll try to get someone from Antenna House answer it. From what I know Antenna House also has a special DITA OT PDF plugin so they might want you to consider using it to produce the PDF as it works better with their engine.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service