Pages: 1
Print
Author Topic: <shortdesc> gets ignored for chapter topics in PDF output  (Read 4449 times)
yz
Member

Posts: 7


« on: March 01, 2011, 03:11:56 PM »

When I print my DITA book to PDF, the <shortdesc> content gets ignored for all <chapter> topics. Regular <topicref>s work just fine. Any advice or insight about this???

Thanks!

(XMetaL Author Version#: 6.0.1.030)
« Last Edit: March 02, 2011, 12:07:50 PM by yz » Logged
Derek Read
Program Manager (XMetaL)
Administrator
Member

Posts: 2621



WWW
« Reply #1 on: March 03, 2011, 04:35:22 PM »

If you are generating output using "XMetaL Enhanced PDF via RenderX XEP" this is by design (ie: I believe the people that wrote the XSLT/XSL-FO thought it was a good idea).

In order to give you some pointers on where you might alter the XSLT to get what you want I think it would be best to see your files. Bookmaps are quite flexible (chapter can appear inside various other elements) and any XSLT alterations might need to be made specific to your type of bookmap.

However, if things are outputting as you like for <topicref> have you tried creating this type of structure?
Code:
<chapter>
  <topicref format="dita" href="mytopic.xml" navtitle="my navigation title" scope="local" type="topic"></topicref>
</chapter>

Can I assume you have something like this?
Code:
<chapter format="dita" href="mytopic.xml" navtitle="my navigation title" scope="local" type="topic"></chapter>
Logged
yz
Member

Posts: 7


« Reply #2 on: March 04, 2011, 11:48:42 AM »

Thanks for the feedback, Derek. You're right about how we're defining the <chapter>. Although your suggested restructuring gives us back the <shortdesc> information, it then adds a new topic within the chapter, which doesn't work for how we want our resulting PDFs to look. However, we'll dig in to potential XSLT alterations to see if that helps. Thanks again! ~yz
Logged
txvia
Member

Posts: 44


« Reply #3 on: December 19, 2011, 02:23:09 PM »

Hi Derek:

  Is there any other ways of getting <shordesc> to appear in PDF output other than restructuring my ditamap file? Are there lines of code that I can just modify to get that to appear?

My current doc structure is this: <chapter format="dita" href="mytopic.xml" navtitle="my navigation title" scope="local" type="topic"></chapter>

Thanks
Logged
txvia
Member

Posts: 44


« Reply #4 on: December 20, 2011, 12:58:29 PM »

I've resolved this issue, and here is my solution:

1) Go to C:\Program Files (x86)\Common Files\XMetaL Shared\DITA_OT\demo\xmfo\Customization\fo\xsl (Program Files for Windows XP), and open the file "xm_commons_mod.xsl".
2) Search for the following code:

<!--<xsl:call-template name="createMiniToc"/>-->
                    <xsl:message>[XM] no miniTOC in chapter</xsl:message>
                    <xsl:comment>[XM] no miniTOC in chapter</xsl:comment>
                    <xsl:apply-templates select="*[contains(@class,' topic/body ')]/*"/>

                    <xsl:apply-templates select="*[contains(@class,' topic/topic ')]">
                        <xsl:with-param name="include" select="'true'"/>
                    </xsl:apply-templates>

3) Add the following code right after <xsl:comment>[XM] no miniTOC in chapter</xsl:comment> in the code above:

<xsl:apply-templates select="*[contains(@class,' topic/shortdesc ')]">
                        <xsl:with-param name="include" select="'true'"/>
                    </xsl:apply-templates>

4) The entire code now looks like this:

<!-- <xsl:call-template name="createMiniToc"/> -->
                    <xsl:message>[XM] no miniTOC in chapter</xsl:message>
                    <xsl:comment>[XM] no miniTOC in chapter</xsl:comment>
                   
                    <xsl:apply-templates select="*[contains(@class,' topic/shortdesc ')]">
                        <xsl:with-param name="include" select="'true'"/>
                    </xsl:apply-templates>
                   
                    <xsl:apply-templates select="*[contains(@class,' topic/body ')]/*"/>

                    <xsl:apply-templates select="*[contains(@class,' topic/topic ')]">
                        <xsl:with-param name="include" select="'true'"/>
                    </xsl:apply-templates>

Hope this helps anyone who is interested.
Logged
Pages: 1
Print
Jump to:  

email us