User Guide
114 Chapter 7 Using Web Development Languages
Formatting code with CodeSweepers
CodeSweepers automate the task of formatting your code correctly. It is especially
useful in the following situations:
• Enforcing a uniform coding style for developers by having them use the same
Codesweeper options
• Cleaning up the code formatting of a project as you review its documents
• Applying formatting rules after using a visual editor
HomeSite+ for Dreamweaver MX includes several CodeSweepers, each configured
for a specific type of development. You can edit these CodeSweepers, and you can
create your own CodeSweepers.
About Macromedia CodeSweepers
CodeSweepers are available for HTML only, HTML/CFML, JSP, Web-XML, and
WDDX. My CodeSweeper is useful for testing and editing, and Macromedia Default
HTML Tidy Settings is a preconfigured HTML Tidy for basic code preservation.
For information on formatting documents so that they are XHTML-compliant, see
“Using CodeSweepers to convert your code to XHTML” on page 105.
About HTML Tidy
HTML Tidy is an independent, open source code utility for verifying and formatting
HTML code. It was developed by Dave Ragget under the auspices of the W3C.
HomeSite+ for Dreamweaver MX provides HTML Tidy as an alternative to the
Macromedia CodeSweepers. It has additional language support, and useful features
such as line wrapping, converting tags, and working in XML.
If new features are added to HTML Tidy between HomeSite+ for Dreamweaver MX
releases, you can update your version of HTML Tidy.
To upgrade HTML Tidy:
1Expand the Options > Settings > CodeSweepers list and select a CodeSweeper
under HTML Tidy CodeSweepers.
2 At the top of the pane for the CodeSweeper, click the HTML Tidy website link.
3 In the HTML Tidy website, download the latest version.
4 Close HomeSite+ for Dreamweaver MX.
5 Copy the tidy.exe files to the root directory of your HomeSite+ for Dreamweaver
MX installation.
6 Restart HomeSite+ for Dreamweaver MX.
Updating the HTML Tidy version does not affect your configuration settings.