[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: textarea bug?

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



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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.