W3C home > Mailing lists > Public > www-validator@w3.org > July 2015

Re: comments on code validator

From: David Dorward <david@dorward.me.uk>
Date: Mon, 20 Jul 2015 09:27:47 +0100
To: "Patrik Eriksson" <pat.eri@hotmail.com>
Cc: "www-validator@w3.org" <www-validator@w3.org>
Message-ID: <05CA53F0-414B-4661-8E88-712A44B31C6F@dorward.me.uk>
On 20 Jul 2015, at 5:54, Patrik Eriksson wrote:

> some comments about parsing errors
> 1.
> <script type="text/javascript" type="application/javascript">
> is reported incorrecly as having duplicate type attributes

No. It is correctly reporting an error.

> its actually defining two MIME types for it one for older parsers
> who will fail if encuntering application/javascript
> and one for newer as text/javascript is obsolete
> text/javascript is the default value - but its absolete so application/javascript
> must alwas be specified

HTML provides no mechanism for providing a fallback attribute value.

The type attribute is optional in HTML 5. Write HTML 5 and omit it entirely.

> 2.
> <div onmousenter="something();" onmouseover="somethinelse();" onmouseout="somemore();">
> This work in all browsers since IE5 DOM1</div>
> onmouseenter and such reported as not being supported on div elements at this time - they are

They are reported as not being HTML. Non-standard extend-features might be well supported, but that doesn't make them HTML.

Binding event handlers with JavaScript is generally preferred over intrinsic event attributes anyway.

> 3.
> <iframe width="100px" height="100px" class="mainFrame" name="main" id="mainFrame" src="Page..html">
>  <p>This text should never be displayed</p>
> </iframe>
> cases an pareser error width/height in specified in pixels when parsed as html 5/5.1
> -again 100 should never be used as a measurment of pixels instead 100px should be
> (as specified by the standard), in html5 it must be specified in pixels, assuming 100 means 100 pixels

To specify a value in pixels you would use width="100". You don't specify the unit except for percentages. You seem to be confusing HTML rules with CSS rules.

> ...also the parser say something about negative valuse not allowed, well iframes are inline elements so negative values should be perfectly legal (even if they forces the page to reflow), it makes no sense use negative values - but it should be perfectly allright to use negaive values,

The spec says "The attributes, if specified, must have values that are valid non-negative integers.". If you think that negative values should be allowed, take it up with the spec writers. You may find it hard to convince them since you also claim that negative values there don't make sense.

David Dorward
Received on Monday, 20 July 2015 08:28:39 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 14:18:13 UTC