entry-form.xsl: Correctly generate HTML for params with imported types

This is a nearly-10-year-old bug that was introduced when the Summary Page
was modified to use the then-new symbol table.  The compiler previously
concatenated all packages into a single XML tree and processed that, so no
package resolution was necessary here before.
main
Mike Gerwitz 2021-07-14 09:59:45 -04:00
parent 513b8d7b86
commit 37977a8816
2 changed files with 13 additions and 8 deletions

View File

@ -21,6 +21,11 @@ Compiler
- Make Summary Page less chatty. - Make Summary Page less chatty.
- Fix incorrect package name for generated worksheet packages. - Fix incorrect package name for generated worksheet packages.
Summary Page
------------
- Correctly generate input fields for params using imported types.
- This is a long-standing (nearly 10-year-old) bug.
v18.0.1 (2021-06-24) v18.0.1 (2021-06-24)
==================== ====================

View File

@ -276,9 +276,8 @@
<xsl:variable name="type" select="@type" /> <xsl:variable name="type" select="@type" />
<!-- the typedef may or may not be in the same package as the param --> <xsl:variable name="typesym" as="element( preproc:sym )" select="
<xsl:variable name="typesym" select=" $program/l:dep/preproc:sym[
$pkg/preproc:symtable/preproc:sym[
@type='type' @type='type'
and @name=$type and @name=$type
] ]
@ -295,10 +294,11 @@
<!-- load the typedef from the appropriate package --> <!-- load the typedef from the appropriate package -->
<xsl:variable name="typepkg" select=" <xsl:variable name="typepkg" select="
if ( $typesrc and not( $typesrc='' ) ) then if ( $typesrc and not( $typesrc='' ) ) then
document( concat( $typesrc, '.xmlo' ), $sym )/lv:* document( concat( $typesrc, '.xmlo' ), $program )/lv:*
else else
$pkg $pkg
" /> " />
<!-- this makes maintinance more difficult, but speeds up searching large <!-- this makes maintinance more difficult, but speeds up searching large
trees --> trees -->
<xsl:variable name="typedef" select=" <xsl:variable name="typedef" select="
@ -316,15 +316,15 @@
<xsl:otherwise> <xsl:otherwise>
<xsl:message> <xsl:message>
<xsl:text>[summary] warning: unknown param type `</xsl:text> <xsl:text>[summary] internal: unhandled type `</xsl:text>
<xsl:value-of select="$typesym/@src" />
<xsl:text>/</xsl:text>
<xsl:value-of select="@type" /> <xsl:value-of select="@type" />
<xsl:text>' for param `</xsl:text>
<xsl:value-of select="@name" />
<xsl:text>'</xsl:text> <xsl:text>'</xsl:text>
</xsl:message> </xsl:message>
<span class="error"> <span class="error">
<xsl:text>Unknown type: </xsl:text> <xsl:text>Unhandled type: </xsl:text>
<xsl:value-of select="@type" /> <xsl:value-of select="@type" />
</span> </span>
</xsl:otherwise> </xsl:otherwise>