The following XSL works fine with the Lotus XSL 2.0.1 implementation of
Xalan:

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
version="1.0"
                xmlns="http://www.w3.org/TR/REC-html40";
                xmlns:xalan="http://xml.apache.org/xalan";
                extension-element-prefixes="xalan">

<xsl:output encoding="utf-8" method="html" indent="yes"/>

        <!--...some other templates...-->

<xsl:template match="input">
      <xsl:element name="input">
            <xsl:variable name="varname"><xsl:value-of
select="concat(local-name(..),'_',local-name())"/></xsl:variable>
            <xsl:attribute name="type">text</xsl:attribute>
            <xsl:attribute name="name"><xsl:value-of
select="$varname"/></xsl:attribute>
            <xsl:attribute name="size"><xsl:value-of
select="@size"/></xsl:attribute>
            <xsl:attribute name="value"><xsl:value-of
select="xalan:evaluate($varname)"/></xsl:attribute>
            <xsl:if test="@maxsize != ''">
                  <xsl:attribute name="maxsize"><xsl:value-of
select="@maxsize"/></xsl:attribute>
            </xsl:if>
      </xsl:element>
</xsl:template>

I'd now like to start playing with translets so I've brought up Xalan
2.2.D11 in the same environment (Websphere on NT ) running the same style
sheets.

I've found that the line that invokes the xalan:evaluate causes a empty HTML
body to be output.  Commenting it out allows everything to proceed as one
would expect.  I will note that the results of the evaluate will be to an
empty / non-existent node...

Peter Hunsberger

Reply via email to