Webhelp XSLT glossentry override
Posted: Fri Mar 25, 2016 6:16 pm
Hi,
Where do we configure the glossary output structure for glossary entries in the Webhelp XSL files?
For the PDF plugin, we use the following template and FO blocks. We'd like to do something similar in the Webhelp plugin.
Thanks. I am still quite new to the web publishing side of building XSLTs.
Take care,
- Nick
Where do we configure the glossary output structure for glossary entries in the Webhelp XSL files?
For the PDF plugin, we use the following template and FO blocks. We'd like to do something similar in the Webhelp plugin.
Code: Select all
<xsl:template match="*[contains(@class,' glossentry/glossentry')]">
<xsl:variable name="glossSynonym" select="*[contains(@class, ' glossentry/glossBody ')]/*[contains(@class, ' glossentry/glossAlt ')]/*[contains(@class, ' glossentry/glossSynonym ')]/node()"/>
<xsl:variable name="glossAcronym" select="*[contains(@class, ' glossentry/glossBody ')]/*[contains(@class, ' glossentry/glossAlt ')]/*[contains(@class, ' glossentry/glossAcronym ')]/node()"/>
<xsl:variable name="glossdef" select="*[contains(@class, ' glossentry/glossdef ')]/node()"/>
<xsl:variable name="glossterm" select="*[contains(@class, ' glossentry/glossterm ')]/node()"/>
<fo:block xsl:use-attribute-sets="__glossary__entry">
<xsl:call-template name="commonattributes"/>
<fo:block>
<xsl:attribute name="id">
<xsl:call-template name="generate-toc-id"/>
</xsl:attribute>
<fo:block xsl:use-attribute-sets="__glossary__term">
<xsl:apply-templates select="$glossSynonym"/>
</fo:block>
<fo:block xsl:use-attribute-sets="__glossary__def">
<xsl:if test="$glossAcronym">
<xsl:apply-templates select="$glossterm"/>
<xsl:text>. </xsl:text>
</xsl:if>
<xsl:apply-templates select="$glossdef"/>
</fo:block>
</fo:block>
</fo:block>
</xsl:template>
Take care,
- Nick