- From: Jukka K. Korpela <jkorpela@cs.tut.fi>
- Date: Thu, 20 Mar 2008 10:15:31 +0200
- To: "Scott Haneda" <talklists@newgeo.com>, <www-validator@w3.org>
Scott Haneda wrote: > Hi all, I am new to trying to pass validation, at least in that I want > a 100% solid report. Why do you want that? Validation should be a tool, not a goal. > When new features are entered into html, such as some of the custom > things webkit is doing, namely: > > <input type="search" placeholder="Search..." autosave="bsn_srch" > results="5" name="s" id="search" class="standard" size="15" /> > > As you can see, there are type attributes that are not known. This is > a Safari specific feature, I happen to like it. I can see no harm it > would cause to other browsers as it gracefully degrades. Since the dawn of the Web, browsers have added new features along such lines, and old HTML specifications more or less canonicalized this by saying that browsers should ignore a) attributes they don't understand (but they should process the element otherwise normally, including the other attributes) b) tags they don't understand (but they should process the _content_ between unrecognized tags as if the those tags were not there). This does not mean that a document using extensions would conform to specifications. Neither does it mean that it is safe to do so. What happens when some other browser starts recognizing the placeholder, autosave, or results attribute but _differently_, either in the same basic meaning but with different interpretation of its content, or completely differently? > Do I just ignore it, Your choice. > not pass validation, Not passing validation simply means that your document does not conform to the syntactic model (syntax rules) it declares. Validation does not add anything to that fact, still less create it. > and know it is still ok as per my personal desires? You cannot _know_ that. You have no grounds for assuming that other browsers, or the next version of your current browser, won't be disturbed by the nonstandard attributes. The risk is not that they won't recognize them; the risk is that they will - and do something you don't expect. > Are there hacks I can inject to force it to > pass and maintain the features, or is that against the ideals of > validation entirely? Of course you can pass validation by using a syntax definition that matches your actual markup. It's like passing an examination when you can define yourself what the correct answers are. For information about using a "custom DTD", check http://www.cs.tut.fi/~jkorpela/html/own-dtd.html It won't make your document any more standards-conforming than it is now. The whole point, as in validation in general, is to avoid _accidental_ markup errors, like writing </nibr> when you mean </nobr> (which is what I do half the time) and getting nasty effects, or writing auto-save when you mean autosave, or writing attributes in wrong elements, etc. Jukka K. Korpela ("Yucca") http://www.cs.tut.fi/~jkorpela/
Received on Thursday, 20 March 2008 08:16:11 UTC