Mike Gerwitz

Activist for User Freedom

aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/current/include/preproc/template.xsl14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/current/include/preproc/template.xsl b/src/current/include/preproc/template.xsl
index 14868e9..0b6d248 100644
--- a/src/current/include/preproc/template.xsl
+++ b/src/current/include/preproc/template.xsl
@@ -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