Re: comments on code validator

"David Dorward" <[email protected]> Mon, 20 Jul 2015 09:27:47 +0100
Newsgroups gmane.org.w3c.validator
Message-ID <[email protected]>
This is an OpenPGP/MIME signed message (RFC 3156 and 4880).

--=_MailMate_9603695D-A591-4C77-A467-F56849786FD3_=
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

On 20 Jul 2015, at 5:54, Patrik Eriksson wrote:

> some comments about parsing errors
>
> 1.
> <script type=3D"text/javascript" type=3D"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 entire=
ly.


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

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

Binding event handlers with JavaScript is generally preferred over intrin=
sic event attributes anyway.

> 3.
> <iframe width=3D"100px" height=3D"100px" class=3D"mainFrame" name=3D"ma=
in" id=3D"mainFrame" src=3D"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=3D"100". You don't speci=
fy the unit except for percentages. You seem to be confusing HTML rules w=
ith CSS rules.

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

The spec says "The attributes, if specified, must have values that are va=
lid 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 convin=
ce them since you also claim that negative values there don't make sense.=


-- =

David Dorward
http://dorward.co.uk/
--=_MailMate_9603695D-A591-4C77-A467-F56849786FD3_=
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename=signature.asc
Content-Type: application/pgp-signature; name=signature.asc

-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2
Comment: GPGTools - https://gpgtools.org

iQIcBAEBAgAGBQJVrLEDAAoJEIx1Sul6qG3F0NwP/A6WL0V7BxtppWDsENW/R69Z
Up1KrvEKA0ehcELWypwAaOOcBHF6CBjZBj5I8wGz+iEB9qwrhpFPnKCe2PGzK7Yh
3KgJvTPK6RaC/at9z8Hyr+hPLHm9lzkR2ZgKJNmvE+gxs0jcc1aA8NoVaVWNHtbY
vUVuljtZKQquuK9v3OWNV9qrAsGVxcvpl8iZ4EoCcQ+e4RM5dSE1NwwMuyC4Nj6b
oLmWbimkzSeYNyzr77U2KKHv7/XR+4c1vhZbFASi9CSuk88yQSjbMd+dpjgCILUJ
9OaRROxgmxgmh+rvRKUYn4Ud/tEBx2XFXasw1rqLK8XMA48N9yf+8iABZxyZECnl
geLKjVRfEcp4GGBSOeArQdymnFiuODalHkGgzDd7hwxLvKA/M0wBVBRad/AYKCam
1Yf17Hyb0V5uDPgmf+mZzB899PuBJ/A9Asi83bEHJz+rgsJzYnj6vKY6Q5uPozEm
VlEZNnLLaIQKPNu82OlsPNfNqITVfbDF9/K2xQy+6/NF/9rAUUxhOs8GDna3I4DJ
04zFyHl6ImyKAO/gjjPCCtDYcxqQNeq6Clocen2W+h8MVXflfqtqMhr/PH6vfG5T
9lkErcGu70/UFdmPtt8qAMs4RMGiwKnMw/UVP9UPb+drLKI3n6zDZ6UAjVAMu5Sd
Hcl9xcw/zFlW8JfexI77
=+ubl
-----END PGP SIGNATURE-----

--=_MailMate_9603695D-A591-4C77-A467-F56849786FD3_=--