Defer inline-templates with sym-set until symtable is available

Other code relied on expand-sequence, but this really should be implicit,
since it is deceptively useless otherwise.

* src/current/include/preproc/template.xsl (preproc:macros): Defer
    processing of inline-template with sym-set until symbol table is
    available.
master v2.4.0
Mike Gerwitz 2017-12-05 15:07:29 -05:00
parent c207fad008
commit 2878d1099c
1 changed files with 14 additions and 0 deletions

View File

@ -328,6 +328,20 @@
</xsl:function>
<!--
Inline templates depending on the symbol table must not be expanded
until the symbol table is actually available
-->
<xsl:template mode="preproc:macros" priority="6"
match="lv:inline-template[ lv:for-each/lv:sym-set
and not( root(.)/preproc:symtable ) ]">
<lv:expand-sequence>
<xsl:sequence select="." />
</lv:expand-sequence>
<xsl:message select="'[preproc] deferring inline-template waiting for symbol table'" />
</xsl:template>
<!--
An inline template implicitly defines and then immediately applies a template