This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: textarea bug?
- To: xsl-list at lists dot mulberrytech dot com
- Subject: Re: [xsl] textarea bug?
- From: David Carlisle <davidc at nag dot co dot uk>
- Date: Sat, 21 Apr 2001 22:40:25 +0100
- References: <20010421141258.46088.qmail@web12208.mail.yahoo.com>
- Reply-To: xsl-list at lists dot mulberrytech dot com
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:attribute
name="name"><xsl:value-of
select="@NAME"/></xsl:attribute>
</xsl:element>
<xsl:value-of select="@VALUE"/>
<xsl:element name="/textarea"/>
</xsl:template>
should be
<xsl:template match="TAREA">
<textarea name="{@NAME}>
<xsl:value-of select="@VALUE"/>
</textarea>
</xsl:template>
David
_____________________________________________________________________
This message has been checked for all known viruses by Star Internet delivered
through the MessageLabs Virus Control Centre. For further information visit
http://www.star.net.uk/stats.asp
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list