Subject: Re: [xsl] Un-cdata-section-elements From: David Carlisle <davidc@xxxxxxxxx> Date: Tue, 21 Mar 2006 23:27:09 GMT |
> ]The problem isn't the validity of the XML, but the validity of the > JavaScript embedded within it. That isn't a problem if the page is handled by an XHTML system as it will resolve all the XMl syntax before passing to javascript, so the script element can contain <![CDATA or < etc and javascript never sees any of it. The only problem is if you generate xhtml but send it to an html system such as IE or if you send it with an html mime type to a system such as firefox that can handle both xhtml and html. Is there any reason why you need to generate xhtml rather than html? If you used xsl:output method="html" the script element would be output as an html CDATA element and < would be output as < rather than < so javascript would not be confused. If you generate XHTML pages you should use an xhtml mime type (eg application/html+xml) and only serve it to systems that understand xhtml (which rules out IE). David ________________________________________________________________________ This e-mail has been scanned for all viruses by Star. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk ________________________________________________________________________
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Un-cdata-section-elements, Alexander Johannesen | Thread | Re: [xsl] Un-cdata-section-elements, Alexander Johannesen |
Re: [xsl] Re: Un-cdata-section-elem, Alexander Johannesen | Date | RE: [xsl] Re: Un-cdata-section-elem, Nathan Young -X \(na |
Month |