Re: [xsl] textarea bug?

Subject: Re: [xsl] textarea bug?
From: David Carlisle <davidc@xxxxxxxxx>
Date: Sat, 21 Apr 2001 22:40:25 +0100

You should not get any output at all from that stylesheet (which
processor are you using?

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

xsl:element may only be used to specify a legal XML name XML names may
not start with /.

You have completely misunderstood how XSL works, you are not generating
the literal XML syntax, so you never want to write "/textarea" you are
generating a tree of nodes. The element node created by xsl:element
is the _whole_ element not just the start tag.

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

should be

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


This message has been checked for all known viruses by Star Internet delivered
through the MessageLabs Virus Control Centre. For further information visit

 XSL-List info and archive:

Current Thread