Mike Gerwitz

Activist for User Freedom

aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Gerwitz <mike.gerwitz@rtspecialty.com>2018-01-31 10:20:39 -0500
committerMike Gerwitz <mike.gerwitz@rtspecialty.com>2018-02-01 13:07:51 -0500
commit9c4fbdace9e3d488bdb3666817953df068349ade (patch)
treef21539c3aa497a01431a006de570b325f3197577
parentb36cc3a9425b48e14b85e06dca64923059e4346c (diff)
downloadtame-9c4fbdace9e3d488bdb3666817953df068349ade.tar.gz
tame-9c4fbdace9e3d488bdb3666817953df068349ade.tar.bz2
tame-9c4fbdace9e3d488bdb3666817953df068349ade.zip
symtable: Only consider first lv:rate ancestor for parent (bugfix)
This is a situation that should never happen (I haven't yet determined whether or not we should support this type of thing in the future), but when it does, do something intelligent. * src/current/include/preproc/symtable.xsl (preproc:symtable)[c:*[@generates]]: Consider only first ancestor lv:rate.
-rw-r--r--src/current/include/preproc/symtable.xsl5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/current/include/preproc/symtable.xsl b/src/current/include/preproc/symtable.xsl
index e8fefe5..e011565 100644
--- a/src/current/include/preproc/symtable.xsl
+++ b/src/current/include/preproc/symtable.xsl
@@ -705,7 +705,10 @@
<xsl:template match="c:*[ @generates ]" mode="preproc:symtable" priority="5">
- <xsl:variable name="parent" select="ancestor::lv:rate" />
+ <!-- it's possible that templates generating rate blocks will cause nested
+ rate blocks, so only take the first ancestor -->
+ <xsl:variable name="parent" as="element( lv:rate )"
+ select="ancestor::lv:rate[1]" />
<xsl:variable name="dim" as="xs:integer"
select="if ( @dim ) then @dim else 1" />