View Full Version : Unary decrement ruins validation
03-19-2004, 06:48 AM
Why is it that the W3 validator always chokes up on unary decrements?
03-19-2004, 07:04 AM
Did you enclose the codes in CDATA block?
/* <![CDATA[ */
/* ]]> */
03-19-2004, 07:10 AM
I was using the <!-- and -->. I've never seen this CDATA thing ever used in a script before. How widely known is it? I've never really commented my scripts out unless it was for sake of validation. What exactly is it and how is it interpreted? I've only seen it used in DTD files. Is this parsed by the browser or the validator?
03-19-2004, 07:25 AM
CDATA is required in XML for <, > and & to not be considered specialo characters. The only character sequence CDATA may not include, and whicdh will not be considered as raw character data, is ]]>
It's an XML structure, unnecessary in HTML. That's the reason we place it within comments.
As for <!-- --> not able to contain --, that is because -- was the toggle on/off comments in parser command sequences in SGML. In XML it may not be placed within parser command sequences, and must contain only a single comment.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.