J
Jeff Higgins
Hi,
In the variable "anchor" I would like to,
(I think), use the value of the variable "text"
in the predicate of the select expression.
Is this possible?
Is there a better way of doing
what I think I want to do?
Is there an easier way of using the values
of variables other than thru the value-of element?
<xsl:template match="addinfo">
<xsl:variable name="text"
select="addinfo_link_text"/>
<xsl:variable name="prefix"
select="addinfo_prefix"/>
<xsl:variable name="anchor"
select="//section/anchor
[../section_header = '$text']"/>
<xsl:variable name="page"
select="addinfo_pg_no"></xsl:variable>
<xsl:variable name="postfix"
select="addinfo_postfix"/>
<span><a>
<xsl:attribute name="href"><xsl:value-of
select="$anchor"/></xsl:attribute>
<xsl:value-of select="$prefix"/>
<xsl:value-of select="$text"/>
<xsl:value-of select="$postfix"/>
<xsl:value-of select="$page"/>
</a></span>
<xsl:apply-templates/>
</xsl:template>
Thanks
Jeff Higgins
In the variable "anchor" I would like to,
(I think), use the value of the variable "text"
in the predicate of the select expression.
Is this possible?
Is there a better way of doing
what I think I want to do?
Is there an easier way of using the values
of variables other than thru the value-of element?
<xsl:template match="addinfo">
<xsl:variable name="text"
select="addinfo_link_text"/>
<xsl:variable name="prefix"
select="addinfo_prefix"/>
<xsl:variable name="anchor"
select="//section/anchor
[../section_header = '$text']"/>
<xsl:variable name="page"
select="addinfo_pg_no"></xsl:variable>
<xsl:variable name="postfix"
select="addinfo_postfix"/>
<span><a>
<xsl:attribute name="href"><xsl:value-of
select="$anchor"/></xsl:attribute>
<xsl:value-of select="$prefix"/>
<xsl:value-of select="$text"/>
<xsl:value-of select="$postfix"/>
<xsl:value-of select="$page"/>
</a></span>
<xsl:apply-templates/>
</xsl:template>
Thanks
Jeff Higgins