summary: Render package descriptions on entry form

master
Mike Gerwitz 2017-12-14 12:04:08 -05:00
parent eff8a01a42
commit dd42267bc9
1 changed files with 14 additions and 17 deletions

View File

@ -96,15 +96,24 @@
<!-- generate form fields for each param -->
<xsl:for-each-group select="/lv:package/l:dep/preproc:sym[ @type='param' ]"
group-by="@src">
<xsl:variable name="pkg-name"
select="preproc:package-name(
current-grouping-key(),
$root-pkg )" />
<xsl:variable name="pkg"
select="if ( not( @src = '' ) ) then
document( concat( @src, '.xmlo' ), $root-pkg )/lv:*
else
()" />
<xsl:variable name="pkg-display"
select="if ( $pkg ) then
concat( $pkg/@desc, ' (', $pkg/@name, ')' )
else
''" />
<xsl:variable name="pkg-name" select="$pkg/@name" />
<fieldset class="param-set">
<legend data-pkg-name="{$pkg-name}">
<a href="#pkg-{$pkg-name}" class="sym-ref sym-pkg sym-large">
<xsl:value-of select="$pkg-name" />
<xsl:value-of select="$pkg-display" />
</a>
</legend>
@ -127,18 +136,6 @@
</xsl:template>
<xsl:function name="preproc:package-name" as="xs:string">
<xsl:param name="src" as="xs:string" />
<xsl:param name="root-pkg" as="element( lv:package )"/>
<xsl:sequence select="
if ( not( $src = '' ) ) then
document( concat( $src, '.xmlo' ), $root-pkg )/lv:*/@name
else
''" />
</xsl:function>
<!--
Generate text and input for a global parameter