Whamcloud - gitweb
LUDOC-372 build: Fix a condition issue with the PDF build 83/28583/3
authorJoseph Gmitter <joseph.gmitter@intel.com>
Thu, 17 Aug 2017 15:12:28 +0000 (11:12 -0400)
committerJoseph Gmitter <joseph.gmitter@intel.com>
Thu, 17 Aug 2017 18:19:08 +0000 (18:19 +0000)
This patch fixes an issue with the building of the PDF
version of the manual where sections designated to use
an "Introduced in Lustre 2.X" frame were not being
processed and the entire section heading was missing.

The technical issue that was occuring during the PDF
processing is that the template in the PDF stylesheet,
style/customstyle.fo, was dropping the content passed to it.
This did not effect non-section tags, however, for section tags,
this content included the section number and heading.  It is
resolved by capturing the content passed into the condition
template and relaying it onto the textdecoration_1 template
which makes the calls to render the decoration of the text.
This fix matches what the html template uses for rendering.

This patch does not affect the build for any other
versions of the manual as a different stylesheet is used
for each format.

Signed-off-by: Joseph Gmitter <joseph.gmitter@intel.com>
Change-Id: I7ccae3e6f74ea2501f84ea224b20a8bb56b85894
Reviewed-on: https://review.whamcloud.com/28583
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Jenkins
style/customstyle_fo.xsl

index 6848ac2..7c4149f 100644 (file)
      so that is can be included in this file. Currently, this file
         duplicates customerstyle_common.xsl with some minor differences. -->
 
-<!--  textdecoration_1 applies the style to the text to highlight an region
-               of the documentation refers to a lustre specific version.
-
-               template_{1,2,3} all use the 'condition="{l23,l24}" attributes and add
-               decoration to the rendered version of the manual to show lustre version
-               specific features. -->
-
-<!-- textdecoration_1: a template to highlight regions of text. -->
+<!-- textdecoration_1: a template to highlight regions of text.-->
 <xsl:template name='textdecoration_1'>
        <xsl:param name='version'/>
-       <xsl:param name='chunkid'/>
-       <fo:block-container id="{$chunkid}"
-                       padding='5pt'
-                       border-color='gray'
-                       border-style='solid'
-                       border-width='1pt'>
+       <xsl:param name='content'/>
+       <xsl:param name='id'/>
+       <fo:block id="{id}">
+       <fo:block-container
+               padding='5pt'
+               border-color='gray'
+               border-style='solid'
+               border-width='1pt'>
                <fo:block-container float='left' text-indent='3px' start-indent='-20px'>
                        <fo:block background-color="gray">
                                <xsl:value-of select='$version'/>
                        </fo:block>
                </fo:block-container>
                <fo:block text-indent='0px' start-indent='0px'>
-                       <xsl:apply-templates/>
+                       <xsl:copy-of select="$content"/>
                </fo:block>
-       </fo:block-container>
+               </fo:block-container>
+       </fo:block>
 </xsl:template>
 
-
 <!-- mychapter definition This has been copied from xsl-ns-stylesheets/fo/component.xsl 
        and modified to provide highlight regions of text for an entire chapter. 
        This is consistent with the high-lighting provided by textdecoration_1 !-->
 <!-- conditional matching template: this calls text decoration
           template with the correct variables. -->
 <xsl:template match="*[@condition]">
+        <xsl:param name="content">
+                <xsl:apply-imports/>
+        </xsl:param>
     <xsl:variable name="id">
         <xsl:call-template name="object.id"/>
     </xsl:variable>
                <xsl:otherwise>
             <xsl:call-template name='textdecoration_1'>
                 <xsl:with-param name='version' select="$versionstr"/>
+                               <xsl:with-param name='content' select="$content"/>
                 <xsl:with-param name='chunkid' select="$id"/>
             </xsl:call-template>
                </xsl:otherwise>