[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: <textarea>, HTML and CDATA
[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
|
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
|