Elements missing from output

admin

Administrator
Staff member
I have a template that should produce plain text within <i> tags but the formatting tags are mysteriously missing from the result. This happened even when I changed them to <span> and yet when I inserted an asterisk (to check that the template is being processed), it appeared. I am using nested templates - is there a limit beyond which they become unreliable?

Here's the relevant code snippets:

<xsl:template match="title" mode="with-series">
<xsl:variable name="bookid" select="parent::book/@id" />
<xsl:variable name="clean-bookid" select="substring-after($bookid, 'BOO')" />
<xsl:variable name="title" select="." />
<p class="title">
<a href=http://www.webdeveloper.com/forum/archive/index.php/"reviews/book.asp?id={$clean-bookid}">
<xsl:value-of select="$title" />
<xsl:apply-templates select="following-sibling::series" />
</a>
<xsl:apply-templates select="parent::book/awards/award[@ref='AWA1']" />
</p>
</xsl:template>

<xsl:template match="series">
<xsl:variable name="seriesid" select="@ref" />
<i><xsl:text> (</xsl:text>
<xsl:value-of select="$series/descendant::series[@id=$seriesid]/title" />
<xsl:if test="."> <small>[#<xsl:value-of select="." />]</small></xsl:if>
<xsl:text>)</xsl:text></i>
</xsl:template>
 
Back
Top