Re: Validator Dev Watch: fuzzy matching for unknown elements/attributes

On Mon, 16 Feb 2009, olivier Thereaux wrote:

> The code is ready for testing on our development instance:
> http://qa-dev.w3.org/wmvs/HEAD/
>
> … and I made a little writeup about the ideas and implementation
> details
> http://www.w3.org/blog/systeam/2009/02/16/validator_fuzzy_match
>
> Comments and thoughts welcome here, or on the systeam blog. In
> particular:
> * What do you think of this feature? Would you have implemented it
> differently?

Keep in mind that I haven't looked at the validator implementation of
this new feature. 8-}

I was tossing around the case-sensitivity issue in my head and a way to
address it. First, I thought why not just do a lc() of the
element/attribute argument  when doing the fuzzy compare? If an error has
been thrown, and you get a full match on fuzzy compare (eg: onLoad, when turned
to "onload" would get an exact match) that would trigger a stronger
assertion message than say, "crass"->"class". Since the main difference
between XHTML and HTML is going to be case-sensitivity, after errors are
thrown from the validator's strict parser they can be treated a bit more
fuzzily. I guess what I'm getting at is I think you can safely ignore case
before you get to fuzzy matching, so you can force all arguments going
in to be one way or the other.

Also, on http://search.cpan.org/dist/String-Approx/Approx.pm
it mentions:
  "You can ignore case by adding the "i" modifier."
I didn't grok the rest of what it was saying at first glance, so that may
not be appropriate...

Hope this is in some way useful or relevant.
-Brian

Brian Wilson --------------------------"Those aren't Sex muffins!   -Coach
bloo@blooberry.com ---------------------Those aren't Love muffins!
http://www.blooberry.com ---------------Those are just BLOOberry muffins!"
Creator of Index DOT Html/Css: http://www.blooberry.com/indexdot/

Received on Tuesday, 17 February 2009 02:36:12 UTC