William Gill wrote:
> Similarly, when validating against a particular DTD, and I get a
> validation error that was deliberate, I can ignore it or create a
> modified version of the DTD that matches the variation.
Indeed. But many people want to validate due to some external requirement.
They don't understand the reasons for the requirement (maybe there isn't
one), and they don't even understand the content of the requirement; they
just want to "pass validation", or get a "clean report".
If the requirement really means that you must "validate against HTML 4.01",
then you just cannot have a <form> element without an action attribute. You
can use a fake value there (since validation does not check the attribute
value at all, except for some minor formalities), or you can dispense with a
<form> element if your form fields are purely JavaScript-driven (and then
you have an accessibility issue, but that's a completely different
perspective).
> The inherent
> risk is that if I leave the "error" in the document, then ask an
> application (i.e. a browser) that relies on the original DTD (or even
> my modified version) to parse the document I don't know how it will
> react to the non-conforming entry,
Theoretically yes, but in practice, browsers don't use DTDs. Some browsers
have validation add-ons, but they don't affect the rendering.
The risk is that you are using an element, or an attribute, or a syntax of
an element that won't be supported by all browsers. People say that HTML
4.01 DTDs reflect the constructs that browsers actually support, but this is
just partly true. There are HTML 4.01 features that aren't supported at all,
or aren't supported by very commonly used browsers. And there are features
that are virtually universally supported but not part of HTML 4.01.
> The value of validation is finding all the unintentional deviations.
Right - it is meant to protect against typos and similar mistakes.
--
Yucca,
http://www.cs.tut.fi/~jkorpela/