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

Re: Understanding why <tag></tag> is the way it is (wa

Subject: Re: Understanding why <tag></tag> is the way it is (was Re: IE Client side transformation issue)
From: Abel Braaksma <abel.online@xxxxxxxxx>
Date: Fri, 03 Aug 2007 18:38:27 +0200
Re:  Understanding why <tag></tag> is the way it is (wa
David Carlisle wrote:
Isn't this part of the HTML spec? I realize that its a bit silly that not using a closing script element breaks the page

that's what the HTML spec would demand, so this behaviour doesn't seem silly to me. remember in html script is a CDATA eleemnt so it turns off < and & as being special characters and normal processing only begins after the literal string </script appears. So ypu can't omit the end tag.

I should not mention HTML when I mean XHTML, sorry for the confusion.


This is rather interesting, because in XHTML <script> has become a PCDATA element. Which means, IIRC, that < and & should be escaped. Which is why in XHTML it is recommended to put the data of a script tag into a <[CDATA[ section, so you don't have to worry too much about all these escaping. In XSLT you can do this by setting the xsl:output attribute of cdata-section-elements to "script".

Cheers,
-- Abel Braaksma

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.