[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Re: Un-cdata-section-elements
On 3/22/06, David Carlisle <davidc@xxxxxxxxx> wrote: > Your problem is just caused by sending a page marked up in one > language (XHTML) to a browser written to interpret another (HTML). > It's like sending Java to a C compiler: you get syntax errors. Well, not quite as the wanted output is perfectly valid syntax. It may be dirty XML, but it certainly is valid. :) And also not quite in regards that some of these browsers *do* know XHTML; the '//' part is there for the browsers that only know HTML. There is no syntax error here, but I'll admit it doesn't feel clean and neat. > You can use disable-output-escaping to get that from XSLT, if you > must. > > <xsl:text disable-output-escaping="yes"><![CDATA[ > //<![CDATA[ > ..... stuff here ... > //]]>]]> > </xsl:text> Manually I can do pretty much anything I like, that's not the problem. The problem is the use of <xsl:template match="script"> and how XSLT processors treat it; the output node tree will be converted from its native form to whatever output you specify, and if that's XHTML 1.0 Strict than the processors I'm using fill in the automatic CDATA section of <script> elements in the node tree. It's not so much that I can't live without this "best-practice", but it would be preferrable to have it, in the name of keeping things as valid and backwards compatible as possible at the same time. Alex -- "Ultimately, all things are known because you want to believe you know." - Frank Herbert __ http://shelter.nu/ __________________________________________________
|
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
|