Validator results

I've been doing a bit of scriptng lately where I take the results returned
from a web page and parse then in AppleScript to extract data. I latest
project was to send text from a text window in an application to the
BabelFish translator at Alta Vista, extract the translated text from the
result and slap this into the text window.

If anybody wants a copy of this AppleScript monstrosity you can grab a
copy at

<ftp://ftp.barebones.com//pub/scripts/mailsmith/Babelfish_Translation.hqx>

This was made difficult by the fact that the html generated by the Alta
Vista site is really, really bad.

So, what does this have to do with the W3C validator you ask?

Simple. I'd like to propose an addition to the feature set of the
validator such that the validator would return the results in XML instead
of HTML (and I don't mean XHTML).

I'd like to see something like:

<?xml version="1.0"?>
<!DOCTYPE report PUBLIC "-//W3C//DTD Validation Report 1.0//EN">
<report>
	<result msg="gotogo" vers="HTML 4.01 Transitional" errors="0" warnings"0" />
</report>

or

<?xml version="1.0"?>
<!DOCTYPE report PUBLIC "-//W3C//DTD Validation Report 1.0//EN">
<report>
	<result msg="errors" vers="HTML 4.01 Transitional" errors="5" warnings"3" />
	<error text="error text here" line="5" column="34" />
	<warning text="warning text here" line="5" column="34" />
	etc
</report>

Now, I can parse out the current html, but that is more work and the html
generated by the validator isn;t guaranteed to not change where as the xml
generated in XML mode could be more durable. And we could publish a
standard for these sorts of validation reports and get the other on-line
validators to support them as well.

Comments?

-- 
Christian Smith  |  csmith@barebones.com  |  http://web.barebones.com
PGP Fingerprint  -  60E5 2216 97D2 1D1A B923 F036 00A9 CEC0 D411 FA89

Received on Saturday, 1 April 2000 22:03:34 UTC