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

Re: Re: Un-cdata-section-elements

Subject: Re: Re: Un-cdata-section-elements
From: "Alexander Johannesen" <alexander.johannesen@xxxxxxxxx>
Date: Wed, 22 Mar 2006 22:39:38 +1100
cdata syntax error
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 ...
> //]]>]]&gt;
> </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/ __________________________________________________

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.