I am new to this, so please bear with me...
I need to very simply modify content based on a template match: topic/body/section/title
This template match works fine. However, I need this to only happen if the topic element has a title element with the value of "Preface".
Can someone please help with the code?
Here is the code:
<topic>
<title>Preface</title>
<body>
<p>This publication was written for...</p>
<section>
<title>Publication Information/Version</title>
Here is the xslt:
<xsl:template match="topic/body/section/title">
<fo:block xsl:use-attribute-sets="prefacetitle"
keep-with-next.within-page="always"
keep-together.within-column="always"
color="{$docColor}">
<!--<fo:marker marker-class-name="title-marker"><xsl:value-of select="normalize-space(.)"/></fo:marker>-->
<xsl:apply-imports/>
</fo:block>
</xsl:template>
<xsl:attribute-set name="prefacetitle" >
<xsl:attribute name="font-family">Trebuchet MS</xsl:attribute>
<xsl:attribute name="font-size">28pt</xsl:attribute>
<xsl:attribute name="font-weight">bold</xsl:attribute>
<xsl:attribute name="margin-bottom">9pt</xsl:attribute>
<xsl:attribute name="keep-with-next.within-column">always</xsl:attribute>
</xsl:attribute-set>
This code works, but I only want it to modify a section/title when it has an ancestor of topic/title[text()='Preface'].
make sense?