At 2003-06-13T13:44-0400, Brock Murch wrote:- > Basically the XML validator chokes on comments inside the <script> tag with > xhtml. If there is a open <!-- to hide the script... (placed there via the > CGI.pm module) and later a decrement is used (ie var this-- ) the parser > calls it a "invalid comment declaration" I have saved a copy of the script > output as a static page here: > To make the page pass the parse test I only need to do remove the <!--comments > tags-->: The validator is correct - you are not allowed to put "--" inside an XML comment. (Even in (SGML) HTML it would be wrong in this case.) In XHTML the content of the script element is #PCDATA, not CDATA (since XML doesn't have the latter), so all markup is treated normally. In particular, you do indeed want a CDATA section so that you don't need to escape markup characters all over the place; but you do not want to put the script inside <!-- -->, because in XHTML's script element that really is a comment. You may wish to consider using <script src="..." /> instead. Tim BagotReceived on Friday, 13 June 2003 15:41:49 GMT
This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:57:10 GMT