Mike Gerwitz

Activist for User Freedom

aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMike Gerwitz <mike.gerwitz@rtspecialty.com>2018-03-16 16:24:06 -0400
committerMike Gerwitz <mike.gerwitz@rtspecialty.com>2018-03-16 16:24:06 -0400
commit5b5055db6d2c3187c7f2d4c1f2b2627d7ac98d31 (patch)
tree9545998ac1dd9c2ce08c0258a6ee1a894a8b100e /src
parentafc1a2038a5061dba320821d7b9d294d3db46c46 (diff)
downloadtame-5b5055db6d2c3187c7f2d4c1f2b2627d7ac98d31.tar.gz
tame-5b5055db6d2c3187c7f2d4c1f2b2627d7ac98d31.tar.bz2
tame-5b5055db6d2c3187c7f2d4c1f2b2627d7ac98d31.zip
preproc/template: Add param-sym-value/@ignore-missing
* src/current/include/preproc/template.xsl (preproc:gen-param-value)[lv:param-sym-value]: Suppress warning for missing symbol and yield empty string if `@ignore-missing='true'`.
Diffstat (limited to 'src')
-rw-r--r--src/current/include/preproc/template.xsl27
1 files changed, 15 insertions, 12 deletions
diff --git a/src/current/include/preproc/template.xsl b/src/current/include/preproc/template.xsl
index 9139f61..6787096 100644
--- a/src/current/include/preproc/template.xsl
+++ b/src/current/include/preproc/template.xsl
@@ -1251,18 +1251,21 @@
<xsl:choose>
<xsl:when test="not( $sym-value ) or $sym-value = ''">
- <xsl:message>
- <xsl:text>warning: unable to find `@</xsl:text>
- <xsl:value-of select="$value" />
- <xsl:text>' for symbol `</xsl:text>
- <xsl:value-of select="$sym-name" />
- <xsl:text>' (does the symbol support `@</xsl:text>
- <xsl:value-of select="$value" />
- <xsl:text>' and has it been imported?)</xsl:text>
- </xsl:message>
-
- <!-- just use the name if nothing is available -->
- <xsl:value-of select="$name" />
+ <!-- error out only if lookup failures aren't explicitly suppressed -->
+ <xsl:if test="not( @ignore-missing = 'true' )">
+ <xsl:message>
+ <xsl:text>warning: unable to find `@</xsl:text>
+ <xsl:value-of select="$value" />
+ <xsl:text>' for symbol `</xsl:text>
+ <xsl:value-of select="$sym-name" />
+ <xsl:text>' (does the symbol support `@</xsl:text>
+ <xsl:value-of select="$value" />
+ <xsl:text>' and has it been imported?)</xsl:text>
+ </xsl:message>
+
+ <!-- just use the name if nothing is available -->
+ <xsl:value-of select="$name" />
+ </xsl:if>
</xsl:when>
<xsl:otherwise>