Mike Gerwitz

Activist for User Freedom

aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Gerwitz <mike.gerwitz@rtspecialty.com>2017-12-11 10:44:31 -0500
committerMike Gerwitz <mike.gerwitz@rtspecialty.com>2017-12-11 10:50:51 -0500
commit838ddb6e32dd8a7fd99f7df9e8d62e3e4d59198a (patch)
tree3629c14683e372ac01421018a7d339bce18a33f0
parente78c3cbe98f6c0f2436285aca057ea1bbc09d9cd (diff)
downloadtame-838ddb6e32dd8a7fd99f7df9e8d62e3e4d59198a.tar.gz
tame-838ddb6e32dd8a7fd99f7df9e8d62e3e4d59198a.tar.bz2
tame-838ddb6e32dd8a7fd99f7df9e8d62e3e4d59198a.zip
summary: Correct rendering of nested c:let expressions
If nested c:let expressions contained values of the same name, they would all be rendered, rather than just the one intended. * src/current/include/display.xsl (do-gen-let-list): Pass let symbol to `_gen-let-list-item'. (_gen-let-list-item): Render only values part of context let expression. [letsym]: New parameter.
-rw-r--r--src/current/include/display.xsl6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/current/include/display.xsl b/src/current/include/display.xsl
index e1e0ee2..b0fa813 100644
--- a/src/current/include/display.xsl
+++ b/src/current/include/display.xsl
@@ -493,6 +493,7 @@
<xsl:call-template name="_gen-let-list-item">
<xsl:with-param name="context" select="$context" />
<xsl:with-param name="class" select="'letequ'" />
+ <xsl:with-param name="letsym" select="." />
</xsl:call-template>
</xsl:for-each>
</xsl:variable>
@@ -507,6 +508,7 @@
<xsl:template name="_gen-let-list-item">
<xsl:param name="context" />
<xsl:param name="class" />
+ <xsl:param name="letsym" />
<li>
<xsl:if test="$class">
@@ -515,14 +517,14 @@
<xsl:choose>
<xsl:when test="@type='lparam' and $context">
- <xsl:text>\(</xsl:text>
+ <xsl:text>let \(</xsl:text>
<preproc:sym-ref name="{@name}" />
<xsl:text> = </xsl:text>
<xsl:variable name="varname" select="@varname" />
<xsl:apply-templates select="
- $context//c:let/c:values/c:value[
+ $context//c:let[ @name = $letsym/@lparent ]/c:values/c:value[
@name=$varname
]/c:*
" />