[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: wierd textarea behaviour with xsl
Declan,
At 10:18 AM 11/12/2002, you wrote: So to try and force a value into the box I used an xsl choose. Tom SW suggested a way to mitigate how verbose it is. Another way -- perhaps not as neat conceptually, but not requiring you to have a fallback node, is simply not to use the xsl:choose. Since, as you've noted, you get no output if there is no ./currentStatus/comment, your logic is equivalent to: <textarea rows="5" cols="40" name="comment" class="textbox"> <xsl:value-of select="currentStatus/comment"/> <xsl:if test="not(currentStatus/comment)">No comments.</xsl:if> </textarea> Not so bad, eh? Notice I've trimmed your './currentStatus/comment' to 'currentStatus/comment' since they mean the same thing. Others have addressed your getting the unwanted XML empty-element syntax. That's the real solution. Cheers, Wendell
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|