Template variable expansion on (lv:param-value|lv:param-inherit)/@name

This allows for dynamically generated metadata names.

* src/current/include/preproc/template.xsl (preproc:apply-template)
  [lv:param-meta]: Expand @name.
  [lv:param-inherit]: Expand @meta.
master
Mike Gerwitz 2018-10-30 13:25:06 -04:00
parent f719d391c7
commit 7ac4c1ce9d
1 changed files with 12 additions and 3 deletions

View File

@ -609,14 +609,19 @@
<xsl:param name="apply" as="node()"
tunnel="yes" />
<!-- determine the value -->
<xsl:variable name="name">
<xsl:call-template name="preproc:template-param-value">
<xsl:with-param name="name" select="@name" />
</xsl:call-template>
</xsl:variable>
<xsl:variable name="value">
<xsl:call-template name="preproc:template-param-value">
<xsl:with-param name="name" select="@value" />
</xsl:call-template>
</xsl:variable>
<preproc:tpl-meta name="{@name}" value="{$value}">
<preproc:tpl-meta name="{$name}" value="{$value}">
<xsl:if test="not( parent::lv:param-copy )">
<xsl:attribute name="hoist" select="'true'" />
</xsl:if>
@ -1079,7 +1084,11 @@
<xsl:param name="apply" as="node()"
tunnel="yes" />
<xsl:variable name="name" select="@meta" />
<xsl:variable name="name">
<xsl:call-template name="preproc:template-param-value">
<xsl:with-param name="name" select="@meta" />
</xsl:call-template>
</xsl:variable>
<!-- find the metadata -->
<xsl:variable name="values"