Mike Gerwitz

Activist for User Freedom

aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Gerwitz <mike.gerwitz@rtspecialty.com>2017-11-29 13:22:29 -0500
committerMike Gerwitz <mike.gerwitz@rtspecialty.com>2017-11-29 13:22:29 -0500
commitef1e6735b6472e13935991756ae899f97e501223 (patch)
tree15a4fa7d56e91fbd743725af17dc06a3bf89cb1e
parente52d6c1eb0fe8e6e1b95f3a5566d17c36da7b6c0 (diff)
downloadtame-ef1e6735b6472e13935991756ae899f97e501223.tar.gz
tame-ef1e6735b6472e13935991756ae899f97e501223.tar.bz2
tame-ef1e6735b6472e13935991756ae899f97e501223.zip
entry-form: Correct rendering of params using imported typedefs
If a param referenced a typedef that was imported from another package, the summary page displayed an error rather than rendering the field. This is a problem for testing using summary pages! Long-standing bug with a fairly easy fix. * src/current/include/entry-form.xsl: (entry-form-field lv:param): Consider correct symbol (was using param symbol, not typedef). [typesrc]: Modernize syntax. [typedef]: Allow for non-root-child elements. The old version of TAME required toplevel typedefs; that's no longer the case.
-rw-r--r--src/current/include/entry-form.xsl22
1 files changed, 8 insertions, 14 deletions
diff --git a/src/current/include/entry-form.xsl b/src/current/include/entry-form.xsl
index fb673e9..5e56110 100644
--- a/src/current/include/entry-form.xsl
+++ b/src/current/include/entry-form.xsl
@@ -247,21 +247,15 @@
<!-- if the @src attribute is empty, then it resides within the same package
-->
- <xsl:variable name="typesrc">
- <xsl:choose>
- <xsl:when test="@src">
- <xsl:value-of select="@src" />
- </xsl:when>
-
- <xsl:otherwise>
- <xsl:value-of select="$sym/@src" />
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
+ <xsl:variable name="typesrc"
+ select="if ( $typesym/@src ) then
+ $typesym/@src
+ else
+ $sym/@src" />
<!-- load the typedef from the appropriate package -->
<xsl:variable name="typepkg" select="
- if ( @src and not( @src='' ) ) then
+ if ( $typesrc and not( $typesrc='' ) ) then
document( concat( $typesrc, '.xmlo' ), $sym )/lv:*
else
$pkg
@@ -269,8 +263,8 @@
<!-- this makes maintinance more difficult, but speeds up searching large
trees -->
<xsl:variable name="typedef" select="
- $typepkg/lv:typedef[ @name=$type ]
- |$typepkg/lv:typedef/lv:union/lv:typedef[ @name=$type ]
+ $typepkg//lv:typedef[ @name=$type ]
+ |$typepkg//lv:typedef/lv:union/lv:typedef[ @name=$type ]
" />
<xsl:choose>