Previewing Web pages that require server-side resources
Arachnophilia Macro Architecture
The HTML Beautifier (located in the HTML menu) will indent your HTML page just as code beautifiers do, except if the page contains legacy HTML, there can be problems one does not see in code beautifiers. Most of the problems are caused by inconsistent HTML syntax — some tags have closing partners, some do not. And some tags have closing partners sometimes, but not other times, both valid syntax. Example:
My paragraph<p> (legal)
<p align=left>My paragraph</p> (also legal)
Because both these forms are valid HTML, and because there are many such valid examples, there is no meaningful way to write a reliable, robust beautifier for legacy HTML, something I discovered over years of trying. But these problems are solved by converting to XHTML, the main intent of the most recent Arachnophilia versions.
The previous major version of Arachnophilia (4.0) had a much more ambitious beautifier that also tried to correct HTML syntax. Eventually, because of the inconsistencies in legacy HTML, both these features (beautify and validate) were downplayed and one was dropped entirely. In the new Arachnophilia (version 5.3 and newer), because of the consistency provided by XHTML, HTML Beautify and HTML Validate are separate functions, and both work as intended
if the page contains valid XHTML syntax.
If you want to keep your pages as they are, e.g not convert to XHTML, but want to use the advanced Arachnophilia features, just make these changes:
- Make sure that every tag in your page either has a closing partner:
<open>content</close>
or is self-closing:
<self-contained tag/>
- Examples of tags that should have closing partners, but did not in earlier versions of Arachnophilia, incude <li></li> and <option></option>.
- Examples of tags that should be made <self-closing/> include <img ... />, <input ... />, <frame .../>, <meta ... /> and about a half-dozen others. The point is there should never be a tag without <either> a </partner> or the special <self-closing syntax/>.
- If this system is followed, you can update your pages with a minimum of effort, and your pages will be more acceptable to browsers as well as Arachnophilia.
This is a bit of an editorial comment. I strongly recommend that the reader consider converting his or her pages to XHTML. This change allows much greater control over page form and content, and will prevent the eventual abandonment of Web pages that are not internally consistent.
As time has passed, I have done all in my power to automate Web page creation, and Arachnophilia represents some steps in this direction (although script writing is the primary approach to automation). In the case of legacy HTML Web pages, it is very difficult to apply automated methods because page content cannot be relied on to follow consistent rules. XHTML was created to correct the glaring deficiencies in HTML, and Arachnophiila is now oriented toward XHTML, to the degree that some of its advanced features won't work with HTML any more.