Im trying to edit a mail being formatted with XSL 1 to display one line if my template conditions are met and information is displayed in the mail. The mail has the current format:
People attending:
person1
-someinfo
person2
-someinfo
People not attending:
person3
-someinfo
The problem is when there are nothing displayed for people not attending, the mail will still show "People not attending:" as i currently have it before running the apply-template.
Is there any good way to display the paragraph before the information about people not attending, only if there are people not attending? The reason for two templates is that in my original code i check for changes in the xml.
Code:
<p>People not attending</p>
<xsl:apply-templates select="1_type/2_group/1_type_f" mode="pn"/>
<xsl:template match="1_type_f" mode="pn">
<xsl:if test="((1_type_f_v/@old_selected='Selected') and (1_type_f_v/@selected!='Selected'))">
<xsl:apply-templates select="t1_type_f_v" mode="pn"/>
</xsl:if>
</xsl:template>
<xsl:template match="1_type_f_v" mode="pn">
<xsl:if test="((@old_selected='Selected') and (@selected!='Selected'))">
<p><xsl:value-of select="../nameOfPerson"/></p>
<ul>
<li><xsl:value-of select="someInfo"/></li>
<p><xsl:value-of select="someInfo2"/></p>
</ul>
</xsl:if>
</xsl:template>