>> http://validator.w3.org/source/
>
> Instructions for that one are only a couple clicks away:
>
> <http://www.mediaville.net/articles/validator/>
Thank you. I had no idea. Checking it out now.
>> It's possible to install these tools on LINUX using PPM
>
> I think you're confused - Linux is not an ancronym, and PPM is for
> Windows. :-)
Yes, indeed, sorry. Hangover. Please substitute "Linux" and "RPM".
I'm working through the instructions on the mediaville.net site, but
it's going to take a while from the looks of things.
How about my original question, just for the sake of it?
I can, for instance, easily create an AppleScript which tells BBEdit to
validate a certain file and write the results to another file -- how
hard would it be to hook in to that with a CGI script?
>> I would like to be able to install a browser-based HTML validator on
>> my OSX web server
David Dierauer - 12 Nov 2004 16:00 GMT
You might also want to look at this article:
http://developer.apple.com/internet/opensource/validator.html
Between it and the mediaville.net article (and W3C's own installation
instructions at http://validator.w3.org/docs/install.html ), I was able to
get the W3C validator working on my mac (OS X 10.3.5) just yesterday. I
had to install Fink to get OpenSP working; my attempts to build it from
source failed, but other than that, it wasn't too tricky.
I, too, considered how to work BBEdit into the mix, but gave up on it
without doing too much digging into its AppleScript dictionary. I find
AppleScript very frustrating to deal with. But if you have the AppleScript
to get BBEdit to write its validation results to a file, it sounds like
you've got the hard part taken care of, and could easily have the cgi read
in the file and display it.
BTW, I'd be interested in seeing your AppleScript, if you'd be willing to
email it to me, preferably off-list, since it's not really on topic for
this list.

Signature
David Dierauer
dierauer@voyager.net
> I'm working through the instructions on the mediaville.net site, but
> it's going to take a while from the looks of things.
[quoted text clipped - 7 lines]
> >> I would like to be able to install a browser-based HTML validator on
> >> my OSX web server
Sherm Pendley - 12 Nov 2004 18:48 GMT
> I can, for instance, easily create an AppleScript which tells BBEdit
> to validate a certain file and write the results to another file --
> how hard would it be to hook in to that with a CGI script?
If BBEdit can be driven via AppleScript, you should also be able to use
Mac::Glue to drive it. Or, you could run your AppleScript with the
"osascript" tool.
sherm--
John Horner - 12 Nov 2004 22:12 GMT
> If BBEdit can be driven via AppleScript, you should also be able to
> use Mac::Glue to drive it. Or, you could run your AppleScript with the
> "osascript" tool.
That got me on the right track -- to the extent that this is already
working:
#!/usr/bin/perl
use strict;
use Mac::AppleScript::Glue;
use LWP::Simple;
print "Enter URL:\n -> ";
my $URL = <STDIN> || die "$!";
getstore( $URL, "/path/to/tempfile.html" ) || die;
my $BB = new Mac::AppleScript::Glue::Application('BBEdit')
|| die "$!";
my $results =
$BB->check_syntax(
file => "path:to:tempfile.html" )
|| die "$!";
foreach my $item ( @{$results} ) {
print 'Line '
. $item->{'result_line'} . ': '
. $item->{'message'} . "\n";
}
I don't quite understand the results data that's coming back from the
Glue object, but the basics are already there. Of course if it was
going to be a CGI script there's a lot of other stuff to do but the
concept is proven at least.