Re: Suggestion: Check elment first, attribute second

On Thu, 2 Aug 2001, Bryce Nesbitt wrote:

> The validator could declare "I don't know what a script looks like in terms of
> syntax" and ignore everything inside the <SCRIPT> container.

First you have to define "inside the <SCRIPT>".  It's not as simple as you
think.

> 	<SCRIPT language="linenoise">
> 		*(@(*#&(@#&(@#@^%^%#@#@{@#@}#@}#{@}]{@}{#}@#{@&%%%%%;!<<!
> 	</SCRIPT>

To take the simplest case in point,

	<SCRIPT language="linenoise">
		*(@(*#&(@#&(@#@^%^%#@#@{@</script>#{@}]{@}{#}@#{@&%%%%%;!<<!
	</SCRIPT>

In real life, it's not always so obvious when that kind of thing happens.
To get rid of the complexity, you'd need to abandon the formulation of
HTML or XHTML as SGML or XML - and the validator would be meaningless.

In any case, if your script causes validator errors, then you haven't
properly understood scripting.  You've already referenced htmlhelp.com,
which has ample tutorial material.

> If the validator EXECUTED the JavaScript, it could check the result.  Since
> that's impractical, at least it can get out of the way, and not complain about
> syntax it does not understand.

It's perfectly feasible for a validator to include a script interpreter
But noone has done it.  Find me a sponsor and I'll be happy to do it!
In fact, I'd be interested to create a value-added validator that will
be useful *also* as a linter and diagnostic tool for script contents.

-- 
Nick Kew

Site Valet - the essential service for anyone with a website.
<URL:http://valet.webthing.com/>

Received on Thursday, 2 August 2001 16:10:42 UTC