XSL: apply fontdef to <keyword> element except when <keyword> is nested in <title>
Posted: Tue May 28, 2019 11:47 pm
Hi,
I would like to achieve the following:
have italics fontdef to all <keyword outputclass="column"> elements in my PDF file (Miramo),
except when <keyword outputclass="column"> is nested in the title
Example:
this is my xslt
Anyone who can help me with the part
Thank you
I would like to achieve the following:
have italics fontdef to all <keyword outputclass="column"> elements in my PDF file (Miramo),
except when <keyword outputclass="column"> is nested in the title
Example:
Code: Select all
<concept id="aa1258889" xml:lang="en-us">
<title>This is my title (<keyword outputclass="column">No Italics keyword</keyword>) </title>
<conbody>
<p><keyword outputclass="column">Italics keyword</keyword></p>
</conbody>
</concept>
Code: Select all
<xsl:template match="*[contains(@class,' topic/keyword ')]">
<xsl:choose>
<xsl:when test="@outputclass='column'[not(self::title/keyword[@outputclass='column'])]">
<Font fontDef="italic">
<xsl:apply-templates/>
</Font>
</xsl:when>
<xsl:otherwise>
<xsl:apply-imports/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
Code: Select all
<xsl:when test...>
Thank you