|
Posted by Jim Higson on 10/30/11 11:40
Alan J. Flavell wrote:
> On Mon, 20 Feb 2006, Jim Higson wrote:
>
>> Since standards compliant browsers ignore rules they doesn't
>> understand anyway, this seems like validation for
>> it's own sake.
> [1]
>
> There's something in what you say. But if your documents are full of
> deliberate non-standard items, you practically lose the ability to use
> the validators and checkers for finding non-deliberate errors.
I'd only ever do this for CSS. XHTML validation is still important.
> I got myself into just that position only yesterday, in putting ruby
> annotation into what was otherwise a valid HTML/4.01 Strict document.
> And did just what I'm warning about - at first I missed a real mistake
> in the markup. (At least in this situation one could validate against
> a custom DTD, and if I decided to go seriously into that, it's what I
> would do. But for a one-off hack...)
For CSS, I just run it through a flex/bison parser to test the syntax. Seems
to work ok. Also, my text editor (kate) is very good at showing bad CSS
syntax.
What I like to do, btw is use server-side PHP to generate stylesheets, and
then run a little shell script to grab the output and turn it back into a
static file.
I also have a little Perl script that strips out whitespace and comments, so
I can write loads of explanations without worrying too much about inflating
the filesize.
--
Jim
Navigation:
[Reply to this message]
|