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

RE: <textarea>, HTML and CDATA

Subject: RE: <textarea>, HTML and CDATA
From: "Passin, Tom" <tpassin@xxxxxxxxxxxx>
Date: Tue, 4 Feb 2003 10:24:51 -0500
cdata textarea
[Mike Brown]

> Well, creating the result that you're asking for is easy...
> 
> <xsl:template match="codebox">
>   <form>
>     <textarea rows="5" columns="50">
>       <xsl:copy-of select="."/>
>     </textarea>
>   </form>
> </xsl:template>
> 
> ... but it is also incorrect. 

... Because the HTML Rec specified that a textarea element may only
contain PCDATA.

Furthermore, if you try to trick the textarea by writing a
<![CDATA[...]]> string into it (say if you were dong it using
javascript), IE and Mozilla handle it differently.  IE displays what you
would expect (the contents without the <![CDATA[]]> envelope, but Moz
displays something broken like [CDATA[...]].

So even if you were willing, you could not be sure what the result would
be.

Cheers,

Tom P

 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.