W3C home > Mailing lists > Public > www-validator@w3.org > April 2007

Re: Validator should ignore text inside <script> tags

From: Gmail Directeur <directeur@gmail.com>
Date: Sat, 28 Apr 2007 01:12:56 +0100
Message-ID: <9ddf33ea0704271712v18d462dax5f9491c1c5446a59@mail.gmail.com>
To: www-validator@w3.org

You can also put the body of your script as cdata

example:
<script>
<![CDATA[
function matchwo(a,b)
{
if (a < b && a < 0) then
   {
   return 1
   }
else
   {
   return 0
   }
}
]]>
</script>


On 4/26/07, Michael Adams <linux_mike@paradise.net.nz> wrote:
>
> On Thu, 26 Apr 2007 20:40:21 +1000
> James Rhodes wrote:
>
> >
> > The validator is attempting to validate text inside the <script> tags,
> > which will obviously produce errors.
> >
>
> The best solution is to have your script in external files.
>
> Not much more can be explained based on the information you have
> supplied:
> DTD - HTML and XHTML are different
> script - javascript, css, vbscript, or tcl
>
> A pointer to the page you are trying to validate is also helpful (almost
> mandatory) if you are asking for assistance.
>
> --
> Michael
> Linux: The OS people choose without $200,000,000 of persuasion.
>
>
Received on Saturday, 28 April 2007 00:12:59 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 25 April 2012 12:14:24 GMT