Mike Gerwitz

Activist for User Freedom

aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Gerwitz <mike.gerwitz@rtspecialty.com>2017-12-05 15:07:29 -0500
committerMike Gerwitz <mike.gerwitz@rtspecialty.com>2017-12-05 15:07:29 -0500
commit2878d1099c90e50e01d60eb44ab1fe8479d9adb7 (patch)
tree0257195cbc790cb52fd632ed9900c8eae2508129
parentc207fad0087947cd4bc303bffb0a185c90f50193 (diff)
downloadtame-2878d1099c90e50e01d60eb44ab1fe8479d9adb7.tar.gz
tame-2878d1099c90e50e01d60eb44ab1fe8479d9adb7.tar.bz2
tame-2878d1099c90e50e01d60eb44ab1fe8479d9adb7.zip
Defer inline-templates with sym-set until symtable is availablev2.4.0
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.
-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