Dominique Hazael-Massieux | 30 Jul 09:20 2009
Picon

WebIDL checker

(bcc to public-html, public-webapps, public-device-apis)

Hello,

I have just released a simple on-line WebIDL checker:
http://www.w3.org/2009/07/webidl-check
It detects bugs in the WebIDLs it finds inside HTML documents - it looks
for <pre> elements with a class set to "idl" or "webidl", and then
validates what it extracts using Aplix' widlproc:
http://widl.webvm.net/svn/widlproc/trunk/doc/widlproc.html

See it for instance:
 * applied to HTML5: http://www.w3.org/2009/07/webidl-check?doc=http%3A%
2F%2Fdev.w3.org%2Fhtml5%2Fspec%2FOverview.html
 * to Geolocation: http://www.w3.org/2009/07/webidl-check?doc=http%3A%2F
%2Fwww.w3.org%2FTR%2F2009%2FWD-geolocation-API-20090707%2F

More details on my blog:
http://people.w3.org/~dom/archives/2009/07/webidl-checker/

I'm open for suggestions of improvements - in particular if having a
other output formats in addition to the HTML report would be useful.

Hope this useful to some,

Dom

Marcin Hanclik | 30 Jul 10:25 2009

RE: WebIDL checker

Hi Dom,

Thanks for the very useful tool!

I think it should be clarified what validity means.
I did similar tool for BONDI APIs, and the problems I encountered were related to the BONDI Design Patterns
we agreed on there.
E.g. Web IDL itself may be correct on syntax level, but it may violate the design patterns by wrong
inheritance, wrong naming, wrong values for constants etc. I call this a semantic checker.
I understand this could be first done once we have some design patterns e.g. in DAP and probably then only for DAP.

The specification of the generated HTML would be good.
It could be something like "spec of the spec".
I mean here documenting the classes you use in the output, like "interface", "attributes", "attribute",
"consts" etc.

Thanks.

Kind regards,
Marcin

BTW: Little typo: In the generated output there is missing a space between attribute's and constants' type
and name.

Marcin Hanclik
ACCESS Systems Germany GmbH
Tel: +49-208-8290-6452  |  Fax: +49-208-8290-6465
Mobile: +49-163-8290-646
E-Mail: marcin.hanclik <at> access-company.com

(Continue reading)

Anne van Kesteren | 30 Jul 12:00 2009
Picon

Re: WebIDL checker

On Thu, 30 Jul 2009 09:20:40 +0200, Dominique Hazael-Massieux <dom <at> w3.org> wrote:
> I have just released a simple on-line WebIDL checker:
> http://www.w3.org/2009/07/webidl-check
> It detects bugs in the WebIDLs it finds inside HTML documents - it looks
> for <pre> elements with a class set to "idl" or "webidl", and then
> validates what it extracts using Aplix' widlproc:
> http://widl.webvm.net/svn/widlproc/trunk/doc/widlproc.html

Awesome! It seems to contain a few bugs however:

http://www.w3.org/2009/07/webidl-check?doc=http%3A%2F%2Fdev.w3.org%2Fcsswg%2Fcssom-view%2F

It is probably that I'm using some of the newer features that have not been integrated into the checker yet.

Cheers,

--

-- 
Anne van Kesteren
http://annevankesteren.nl/

Dominique Hazael-Massieux | 30 Jul 13:11 2009
Picon

Re: WebIDL checker

Le jeudi 30 juillet 2009 à 12:00 +0200, Anne van Kesteren a écrit :
> On Thu, 30 Jul 2009 09:20:40 +0200, Dominique Hazael-Massieux <dom <at> w3.org> wrote:
> > I have just released a simple on-line WebIDL checker:
> > http://www.w3.org/2009/07/webidl-check
> > It detects bugs in the WebIDLs it finds inside HTML documents - it looks
> > for <pre> elements with a class set to "idl" or "webidl", and then
> > validates what it extracts using Aplix' widlproc:
> > http://widl.webvm.net/svn/widlproc/trunk/doc/widlproc.html
> 
> Awesome! 

Thanks! Most of the merits come from Kai and Tim from Aplix, fwiw, since
they produced widlproc.

> It seems to contain a few bugs however:
> http://www.w3.org/2009/07/webidl-check?doc=http%3A%2F%2Fdev.w3.org%2Fcsswg%2Fcssom-view%2F
> 
> It is probably that I'm using some of the newer features that have not been integrated into the checker yet.

Indeed, the underlying processor (widlproc) is based on the grammar of
the current TR version of WebIDL; I understand that updating it with a
newer grammar should be just a matter of updating
http://widl.webvm.net/svn/widlproc/trunk/src/grammar and recompiling
widlproc; I guess I'm leaning toward doing that when a new version of
WebIDL gets into TR.

(I've also made sure that the checker detects WebIDL examples in the
WebIDL spec itself, which highlights the current missing features of
widlproc:
http://www.w3.org/2009/07/webidl-check?doc=http%3A%2F%2Fdev.w3.org%
(Continue reading)


Gmane