Ignore constant parsing for template param references

This is imperfect, but will work based on current assumptions.

* src/current/include/preproc/expand.xsl (preproc:expand)[c:const,lv:const):
  If '@' is found, do not perform expansion.
master
Mike Gerwitz 2018-01-04 11:04:55 -05:00
parent cd5a1a99fc
commit d8c7d8fee2
1 changed files with 13 additions and 0 deletions

View File

@ -273,6 +273,19 @@
</xsl:template>
<!-- anything with a '@' is likely a template variable reference, so we
should not attempt to perform constant expansion -->
<xsl:template mode="preproc:expand" priority="7"
match="c:const[ substring-after( @value, '@' ) ]
|lv:const[ substring-after( @value, '@' ) ]">
<xsl:copy>
<xsl:sequence select="@*" />
<xsl:apply-templates mode="preproc:expand" />
</xsl:copy>
</xsl:template>
<!-- constants that contain 'e' (scientific notation) should be expanded; allows
for avoiding constants with many zeroes, which is hard to read -->
<xsl:template mode="preproc:expand" priority="5"