[whatwg] pattern attribute

Ian Hickson ian at hixie.ch
Mon Aug 23 04:48:36 PDT 2004

On Mon, 23 Aug 2004, Max Romantschuk wrote:
> I guess my point is that silent dropping of errors can be very harmful. 

The silent dropping of errors was one of the main catalysts to the success 
of the Web, IMHO.

One of WHATWG's design principles is based on this:

# Users should not be exposed to authoring errors
# Specifications must specify exact error recovery behaviour for each 
# possible error scenario. Error handling should for the most part be 
# defined in terms of graceful error recovery (as in CSS), rather than 
# obvious and catastrophic failure (as in XML).
 -- http://www.w3.org/2004/04/webapps-cdf-ws/papers/opera.html

> One stellar example of this is the countless web pages out there full of 
> HTML and CSS errors which exist thanks to IE's "helpful" HTML correction 
> features and CSS error handling.

Is that such a problem, though? I mean, why is this harmful? So long as 
the specs define how to handle such cases (which is something HTML failed 
to do, but CSS does it, and WF2 does it for most non-parsing errors), 
interoperability is preserved, which is what matters at the end of the 
day, no?.

> It may not be the same thing, but I believe it should be as hard as 
> possible to construct faulty regexps. If the regexp is dropped silently 
> it is likely to be far less useful than in the case of the developer 
> being alerted of an error and fixing the error, or in a worst case 
> removing the pattern altogether.

I'm open to suggestions; what do you think should happen with invalid 
pattern attributes? Bear in mind the design principle mentioned above; 
end users shouldn't be exposed to these errors.

Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

More information about the whatwg mailing list