Roberto,
The comment structure you are talking about (/**/) is a CSS comment, and has
not effect on the XML document.
In your example the validator will see the CDATA as containing:
*/
@import "CSS/mainStyles.css";
/*
The only characters in the <style> block not enclosed with the CDATA are the
slashes which are safe to have there. So, the validator is happy.
When the XML has been parsed by the browser, the contents of the CDATA is
expanded, so that the value of the <style> node in the XML parse tree is
now:
/**/
@import "CSS/mainStyles.css";
/**/
Once the CSS parser kicks in, the first and last lines will be simply
considered as empty comments. So, the CSS parser is happy.
Thanks,
Tatham Oddie
Technical Director, Fuel Advance
www.fueladvance.com
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Roberto Gorjão
Sent: Monday, 20 June 2005 10:19 PM
To: [email protected]
Subject: Re: [WSG] CDATA
P.S.: Im sorry
I was referring myself to style and script declarations
like this one:
<style type="text/css">
/*<![CDATA[*/
@import "CSS/mainStyles.css";
/*]]>*/
</style>
-----------------------
Roberto Gorjão wrote:
> Hello,
>
>
> I know that CDATA was discussed just some days ago, but I'm still in
> doubt...
> Is there the need to use it with the transitional XHTML DTD?
> Does anybody know if it really functions when surrounded by comment
> tags? Because the W3C recommendation does not mention them.
>
> Thank you.
>
> Roberto
>
> ******************************************************
> The discussion list for http://webstandardsgroup.org/
>
> See http://webstandardsgroup.org/mail/guidelines.cfm
> for some hints on posting to the list & getting help
> ******************************************************
>
>
>
******************************************************
The discussion list for http://webstandardsgroup.org/
See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
******************************************************
******************************************************
The discussion list for http://webstandardsgroup.org/
See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
******************************************************