Re: [xsl] textarea bug?

Subject: Re: [xsl] textarea bug?
From: "Thomas B. Passin" <tpassin@xxxxxxxxxxxx>
Date: Sat, 21 Apr 2001 10:38:29 -0400
You get exactly what you specified.  You closed your textarea element before

      <xsl:value-of select="@VALUE"/>

so naturally the results show  the value after the end of the element.

What I'm surprised about is that the template ran at all.  the instruction

        <xsl:element name="/textarea"/>

contains an illegal element name (no element may have a name like '/xxx').
It looks like you think that you need an xsl:element for each start and end
tag, but that is incorrect. The xsl:element instruction produces a complete
element with both its start and end tags.


the matrix asked -

I get the close textarea tag before the value. Is this
a bug or am I doing something wrong:

<TAREA name="comments" value="this is my comment"/>

<xsl:template match="TAREA">
        <xsl:element name="textarea">
                <xsl:value-of select="@VALUE"/>
        <xsl:element name="/textarea"/>

here is the HTML output:

<textarea name="comments"></textarea>this is my comment

 XSL-List info and archive:

Current Thread