Mike Gerwitz

Activist for User Freedom

aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMike Gerwitz <mike.gerwitz@rtspecialty.com>2018-04-11 14:30:08 -0400
committerMike Gerwitz <mike.gerwitz@rtspecialty.com>2018-04-16 11:11:19 -0400
commitba1faa74da3cf376d09ff56e88def93a93741ff5 (patch)
treebb6665ce7e6d38d660d1cc0673d7553d43ed2f11 /src
parent6a45b2c95aeb4060555f08a5b76b6e5aba62fe01 (diff)
downloadtame-ba1faa74da3cf376d09ff56e88def93a93741ff5.tar.gz
tame-ba1faa74da3cf376d09ff56e88def93a93741ff5.tar.bz2
tame-ba1faa74da3cf376d09ff56e88def93a93741ff5.zip
map: Support `from' within `set'
This was just a matter of proxying `type'. * src/current/compiler/map.xsl (lvmc:compile): Proxy `type' param.
Diffstat (limited to 'src')
-rw-r--r--src/current/compiler/map.xsl12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/current/compiler/map.xsl b/src/current/compiler/map.xsl
index e46230f..8ff1abf 100644
--- a/src/current/compiler/map.xsl
+++ b/src/current/compiler/map.xsl
@@ -618,12 +618,16 @@
</template>
<template match="lvm:map//lvm:set[@ignore-empty='true']" mode="lvmc:compile" priority="3">
+ <param name="type" as="xs:string"/>
+
<text>(function(){</text>
<text>var ret=[]; var tmp;</text>
<for-each select="./lvm:*">
<text>tmp=</text>
- <apply-templates select="." mode="lvmc:compile" />
+ <apply-templates select="." mode="lvmc:compile">
+ <with-param name="type" select="$type" />
+ </apply-templates>
<text>;</text>
<text>if(tmp&amp;&amp;tmp!=='0')ret.push(tmp);</text>
@@ -634,13 +638,17 @@
</template>
<template match="lvm:map//lvm:set" mode="lvmc:compile" priority="2">
+ <param name="type" as="xs:string"/>
+
<text>[</text>
<for-each select="./lvm:*">
<if test="position() > 1">
<text>,</text>
</if>
- <apply-templates select="." mode="lvmc:compile" />
+ <apply-templates select="." mode="lvmc:compile">
+ <with-param name="type" select="$type" />
+ </apply-templates>
</for-each>
<text>]</text>
</template>