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.master
parent
b36cc3a942
commit
9c4fbdace9
|
@ -705,7 +705,10 @@
|
||||||
|
|
||||||
|
|
||||||
<xsl:template match="c:*[ @generates ]" mode="preproc:symtable" priority="5">
|
<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"
|
<xsl:variable name="dim" as="xs:integer"
|
||||||
select="if ( @dim ) then @dim else 1" />
|
select="if ( @dim ) then @dim else 1" />
|
||||||
|
|
Loading…
Reference in New Issue