get your hands on quality ActionScript examples
21 08 2006Very cool, very neat service contining great code samples for Flash and Flex : IFBIN. A must for any ActionScript developer.
Categories : Flex, ActionScript, Flash
Very cool, very neat service contining great code samples for Flash and Flex : IFBIN. A must for any ActionScript developer.
While many development tools include report generators capable of testing the validity of your xhtml site wide, they can only act on the code they are aware of. Where pages are dynamically generated using server-side scripting such as ASP / PHP etc, the only real way of testing the resulting xhtml is to test the content at run-time. The w3c validator is a handy tool for doing this, but it can become tedious to use interactively across a large number of files or test-cases. Additionally, if the site files are part of an extranet, or carry confidential information, you won’t want to be pushing the content out to a public service for validation.
An approach I use from time to time is to batch test site files on an internal network. To do this I use the following tools…
There is a small amount of work to do in setting up your system for this approach.
Apple have produced and maintained an excellent article on how to install the validator onto your Mac OS X system. However I found a few areas which at time of writing were not accurately described…
As part of the process of installing the validator, you have installed Fink. Fink commander provides a GUI interface to Fink, I suggest you install it as the next step.
Using Fink Commander, download and install wget. This is a command-line utility that we will use to automate the downloading of files.
OK, strictly speaking not a batch file, but a text file of urls for wget to request. We must first take our list of files and process the text for form suitable urls. For this I suggest the following steps…
In the terminal window, use the following commands…
Using the terminal window, navigate to your local webroot folder.To generate a single column list of all the files within webroot we can use the command…
ls -1
We can send the output of one command directly to the next command using the pipe symbol “|”. Ultimately we wish to create a file containing full urls to the files we want to process. So the next stage is to prefix the filenames with the start of the url. We can do this by ‘piping’ the results from ls into awk. Then finally directing the output to file sourceURLs.txt which will be created up one level so as not to infect the webroot. So on one line…
ls -1 *.asp |
awk '{printf"http://localhost/validator/htdocs/check?
uri=http://www.yourdomain.com/%s\n",$1}'
> ../sourceURLs.txt
Note: Currently I don’t have style sheet control on this blog. The above 4 lines should be typed into your terminal as a single line.
cd ..
mkdir validationReports
cd validationReports
wget -Ei ../sourceURLs.txt