BBEdit XML Tools 1.1
This set of scripts add XML well formedness checking and XML validation (against a DTD) to BBEdit. There are two AppleScripts that interface with the JDOM Java library to parse and validate XML files. The inspiration for this set of scripts came from John Gruber's Daring Fireball site, where he had documented a way to do PHP syntax checking in BBEdit via AppleScript.
Version 1.1 fixes a bug that prevented the scripts from working with files that had spaces in their names, including new unsaved documents.
These BBEdit XML tools are freeware.
Download:
Installation:
Inside the 'For BBEdit Support' directory, you'll find two sub directories, 'XMLValForm' and 'AppleScripts.' Put the 'XMLValForm' directory directly inside your BBEdit support directory. The 'XMLValForm' folder contains some shell scripts, the JDOM.jar file, and another .jar file that acts as glue between the shell scripts and JDOM. Put the two AppleScripts that are in the 'AppleScripts' directory into the 'Scripts' directory of your BBEdit support directory. You should now see 'XMLForm' and 'XMLValidate' inside your scripts menu in BBEdit.
The BBEdit support directory can usually be found in '/Users/<username>/Library/Application Support/.' If your BBEdit support directory is in a different location, you'll need to edit the 'PathToLib' variable in both AppleScripts. To make the edit, double click on the AppleScript files, and they will open in the 'Script Editor.' There is a note at the top of each file describing what needs to be done.
Upgrade:
The only differences between this version (1.1) and the previous version (1.0) are in the AppleScript files. So, if you have the previous version, you just need to move the AppleScript files as noted above.
The 'src' directory contains the Java source that's used to glue the AppleScript to the JDOM library. It's not necessary for the XML functionality and you can ignore if you want.
This has been tested with BBEdit 7 and 8. If you're using an older version, your mileage may vary (or you may, in fact, get no mileage at all).
Usage:
Open or create a new XML document in BBEdit. To see if your document is well formed, select 'XMLForm' from the scripts menu. To see if your document is valid against a DTD, select 'XMLValidate.'
Contact: