Copyright: (C) 1996, Talicom (http:


Contents
HTML Tag Pair Fixer Help Contents

Getting Started

•	Introduction

•	Quick Start

•	About the Main Window

How to

•	Define a Website Project

•	Select Options

•	Run a Tag Pair Fix

Other Stuff

•	About HTML Tag Pair Fixer

•	Other HTML PowerTools

•	Register this Program


Introduction

The single most common syntax error when creating HTML documents in a text editor is the mismatched tag pair: forgetting the / in a closing tag (e.g., <TD>cell contents<TD>), inserting a / in an opening tag (e.g., </B>bold text</B>), forgetting the closing tag entirely, and having redundant tags floating around.

While HTML PowerAnalyzer can be used to alert you to all of these errors, it is still time-consuming to go and manually fix each one. If this type of error managed to creep into a piece of markup used as a template and replicated many times, fixing them all is quite a headache.

HTML Tag Pair Fixer is a tool that interactively scans your HTML files for mismatched tag pairs. When one is found, you are presented with the error, a proposed fix, and the portion of the file where the error was found. If you agree with the proposed solution, just click "Change It" to make the change. You may also select "Delete It" if it is redundant, "Leave It" if it is there intentionally for some reason (or if you want to make the change yourself in a text editor), or "Edit It" if you want to make a free-form change on the spot.

And because tag pair validation differs among HTML standards (for example, in HTML 3.2 proposed, </TR> and </TD> tags are not required), HTML Tag Pair Fixer uses the same HTML Rulebase files as HTML PowerAnalyzer to intelligently help you fix mismatched tag pairs in your HTML files.

If you've ever experienced dealing with this type of HTML syntax error you can certainly appreciate the swiftness with which this tool makes the problem go away.

See also:

Quick Start

Defining a Website Project

Running a Tag Pair Fix


Quick Start

Step 1: Select a Website project to analyze

1.	After starting the program, click Select Project.

2.	Click New to define a new Website project to be analyzed.

3.	Enter the required details. Click Help for information on any item.

4.	Click OK.

5.	Click Select.

Step 2: Run the analysis

1.	Click Fix Tag Pairs.

2.	Confirm that the file list shown is what you intend to analyze. To select a single file, click the Other button.

3.	Click Proceed.

4.	When the program finds a tag pair mismatch, it will alert you. For each one found, choose Change It, Delete It, Leave It, or Edit It.


Defining a Website Project

Before running a tag pair fix, you must define the Website to be processed. You do this by clicking Select Project in the main window, then New in the Project Manager window. After entering the required details that define a project, click OK, then Select.

You can now process all the files contained in your defined project.

You can define any number of separate projects. To select a project to be processed, simply select it in the Project Manager window and click Select.

Note: To analyze a single file, that is part of a defined project or not, you can click Other in the Project Window.


Options

All options are set in the Fix Tag Pairs Options window, accessible by clicking Options from the main window.

The available options are:

•	Always Confirm File List - Each time you run the program or select a new project, the file list to be analyzed (based on the current project's definition) must be refreshed (either by clicking Refresh File List or by performing an analysis). If this option is selected, you will be asked if you want to refresh to file list every time you click the Fix Tag Pairs button. If it is not selected, the file list will be automatically refreshed once, and then not again. If you will be making changes to the files contained in your site in between analyses, or if you want to exclude certain files for different analyses, select this option. Otherwise, it is less irritating to leave this option unselected.

•	Audible Alert - If this is selected, then a beep will sound each time a tag mismatch is encountered during analysis.

•	Make Backup when Modifying File - When this is selected, a backup copy of every file modified by the program will be saved, with the specified file extension. If a file with the specified extension already exists, it will be overwritten. It is strongly recommended to always use this option.

•	File Backup Extension - Specify an extension for backup files, when the previous option is selected.

•	HTML Rulebase to Use - As in other HTML PowerTools, HTML Tag Pair Fixer makes its decisions based on information stored in an HTML Rulebase file. Tag Pair Fixer will only pay attention to tags defined in the currently selected Rulebase (others will simply be ignored) and it will know how to deal with recognized tags. For example, whether or not a nested tag pair is valid.


Running an Analysis
Running a Tag Pair Fix

After defining and selecting a project and setting preferred options, click Fix Tag Pairs in the main window.

If the file list has not yet been refreshed, it will be automatically refreshed now. If it has already been refreshed and the option Always Confirm File List is selected, you will be given the chance to refresh it again. You can always manually refresh the file list before an analysis by clicking Refresh File List in the main window.

After refreshing the file list, you will see the list of selected files about to be processed. At this point you have four choices:

•	You may click Proceed to accept the list and begin. (If you clicked the Refresh File List button, the Proceed button will instead be OK).

•	You may choose to exclude certain files from the current run. To do this, click Exclude Files and use the four Include/Exclude buttons to make your selection. Note that this selection will only affect the current run and will not be saved. When done, click Proceed.

•	You may change the permanent definition of the project. To do this, click Modify Project and make any desired changes. Note that this is the same as clicking Modify in the Project Manager window and that all changes are saved. When done, click Proceed.

•	You may disregard the currently defined project and select a single file to analyze. To do this, click the Other button and select a file. When done, click Proceed. Note that this has no impact on the project definition, and is a one-time selection.

The fix tag pairs procedure will now begin.


How to Register

If you are using a limited shareware version, or a borrowed copy of the program, please visit www.tali.com for complete information on registering this and other HTML PowerTools for Windows.

Thank you.


Other HTML PowerTools

All the HTML tools listed on this page are available from TALICOM. All run the Windows environment. Please visit our home page at www.tali.com for more information.

HTML PowerAnalyzer

HTML PowerAnalyzer is a sophisticated tool employing powerful algorithms to scan HTML files and alert the user to all errors contained within them. In addition, a comprehensive report is generated containing a wealth of useful information about each file, and the entire Website.

In addition to all types of HTML syntax errors, HTML PowerAnalyzer will catch invalid &glyph; codes, non-text characters, missing/invalid link references (i.e., files pointed to by HREF, SRC, etc.), missing anchors, and link references containing capital letters (which may be cause problems on case-sensitive Unix servers). (In this version, all files contained in the Website must reside on the user's hard disk. Planned for the next release is the ability to scan a Website stored on a remote server and perform all scanning and link validation remotely.)

HTML PowerAnalyzer supports the very latest HTML 3.2 (proposed), Netscape extensions, and Microsoft Internet Explorer extensions, and can be completely customized. The user can even select which browser (or HTML standard) to analyze for: any proprietary HTML tags (or parameters within standard tags) not supported by the selected browser will be flagged.

HTML PowerAnalyzer's algorithms utilize databases containing all rules of the HTML language -- an HTML Rulebase. The HTML Rulebase Editor, available separately, allows the advanced HTML user to freely modify any and all aspects of the HTML markup language for his particular purposes. This includes adding/deleting HTML tags and tag parameters, redefining language rules for all defined elements, adding/deleting browser definitions, and more. In other words, the user has the ability to totally customize the logic used in the analysis. Another advantage of the HTML Rulebase is that it can be updated by downloading up-to-date files from Talicom's website, www.tali.com, as they become available. Thus, no matter how quickly the HTML language evolves, HTML PowerAnalyzer will never become obsolete.

The professionally-created user interface has been carefully designed and tested to allow easy and intuitive access to all functions. When required, context-sensitive Help is always available by pressing F1 or clicking the Help button.

In today's rapidly changing WWW landscape, it is not enough to visually check a Website in one or two browsers -- you want to be certain that your markup is perfect and error-free. You also want to know for sure that every single image and hyperlink is perfect, without having to scour your site and test-click every link. HTML PowerAnalyzer will automatically provide you with the certainty you need -- with the click of a button.

HTML Rulebase Editor

A great strength of HTML PowerAnalyzer (as well as some other HTML PowerTools) lies in the customizable HTML Rulebase files that contain the rules of the HTML markup language. Due to the many different implementations of HTML in the real world, and the rapid pace at which the language is presently evolving, it is an absolute necessity to be able to quickly and easily customize any software dealing with HTML.

The HTML Rulebase Editor allows you to do just that. No matter how quickly the vendors of HTML editors and other HTML programs react to changes in the language, they will never keep up. But you, the user, will always want to be at the forefront. Using the HTML Rulebase Editor, the HTML PowerTools toolkit can always be completely up-to-date.

The HTML Rulebase Editor features a professionally-designed user interface to allow you intuitive and direct access to every relevant attribute of every HTML tag and tag parameter. You can define all aspects of tags and tag parameters for each specific browser (or HTML standard), and even add support for brand new browsers. For example, when Netscape Navigator 5 is released, you can immediately enter all of its new commands and specify them as valid only for that particular browser.

In addition to tag and parameter information, you can modify the lists of defined protocols (e.g., http://, ftp://) and glyph codes (e.g., &amp; &copy;).

The flexibility and power that the HTML Rulebase Editor provides for users of HTML PowerAnalyzer are unmatched in the HTML software available on the market today.

HTML Tag Pair Fixer

In our experience, the single most common syntax error when creating HTML documents in a text editor is the mismatched tag pair: forgetting the / in a closing tag (e.g., <TD>cell contents<TD>), inserting a / in an opening tag (e.g., </B>bold text</B>), forgetting the closing tag entirely, and having redundant opening tags floating around.

While HTML PowerAnalyzer will alert you to all of these errors, we found that it is till time-consuming to go and manually fix each one. If this type of error managed to creep into a piece of markup used as a template and replicated many times (as has happened us more than once), fixing them all is quite a headache.

HTML Tag Pair Fixer is a tool that interactively scans your HTML files for mismatched tag pairs. When one is found, you are presented with the error, a proposed solution, and the portion of the file where the error was found. If you agree with the proposed solution, just click "Change It" to make the change. You may also select "Delete It" if it is redundant or "Leave It" if it is there intentionally for some reason, or if you want to make the change yourself.

And because tag pair validation differs among HTML standards (for example, in HTML 3.2 proposed, </TR> and </TD> tags are not required), HTML Tag Pair Fixer uses the same HTML Rulebase files as HTML PowerAnalyzer to intelligently help you fix mismatched tag pairs in your HTML files.

If you've ever experienced dealing with this type of HTML syntax error you can certainly appreciate the swiftness with which this tool makes the problem go away.

HTML PowerSearch

Find and replace utilities, included in editors and word processors as well as stand-alone tools, abound. So why buy another one?

First of all, HTML files are not text files, even though they are saved as text. HTML files follow a specific set of rules in how their content is read by an HTML browser, and standard find and replace tools do not take this into consideration. For example, in HTML a space, a tab, and a line break are all equivalent. Well-formatted HTML source that is easy to read and work with contains many tabs and line breaks that will never be rendered when the file is viewed in a browser. Your standard find tool will not know to find the search string "hello world" in the following example, yet in HTML it should be found.In this example we have the text "hello world" separated by a line break and a tab.

HTML PowerSearch is an HTML-specific tool that knows how to intelligently perform searches on HTML files.

Secondly, performing a search or search & replace across an entire Website using an editor or word processor can be very tedious. HTML PowerSearch handles entire Websites, stored in any number of subdirectories, with one button click.

Thirdly, HTML PowerSearch combines its HTML-specific searching with flexible wild-card searching. You will never be able to return to working on your Websites without the aid of HTML PowerSearch.

HTML Image Scanner

Experienced Web developers know -- and beginners will learn -- the value of using the WIDTH and HEIGHT parameters of the IMG tag: much faster perceived loading of a Web page. When the browser is provided with these parameters, it can set aside a frame for the picture which it will load later, and immediately place all the text on the page.

Unfortunately, inserting these parameters into every IMG tag in a Website is terribly tedious and error-prone. First, you have to use some software to determine the width and height of every image you will use. Next, you have to search for every occurrence of an IMG tag in the site. Then, you have to manually type in the appropriate WIDTH=123 HEIGHT=123. Not only does this process take a very long time, it is irritating. Also, typos during this type of mundane, repetitive work are common, resulting in distorted images and more work.

HTML Image Scanner solves this problem once and for all. With the click of a button it will scan every IMG tag and every referenced image in an entire Website and automatically insert the correct WIDTH and HEIGHT parameters. A number of customizable parameters let you decide, for example, whether to alter an existing parameter (that may intentionally be different from the actual image size) or to leave it alone. You can even enter a list of image filenames which you want HTML Image Scanner to ignore.

If you have many images spread across many pages, or if you frequently modify the images included in your pages or add new ones, HTML Image Scanner is an absolute necessity.

HTML to Text Converter

Web authors work with HTML. Even if your source files came from another source, once they have been marked up using HTML, they are no longer viewable without an HTML browser. However, it is often necessary to convert an HTML document back to plain text.

A simple approach would be to simply remove all the HTML markup from a file. This would leave a rather ugly, unformatted text file containing many extra spaces, tabs, and line breaks. A better approach would be to interpret the HTML tags contained in the document, much as an HTML browser does, and create a text file containing some of the formatting from the original. HTML PowerTools' HTML to Text Converter takes this improved approach.

The formatting available in a text file is limited, but HTML to Text Converter maintains many of the important aspects such as headings, titles, bulleted/numbered lists (even multi-level numbered lists), paragraph breaks (differentiating between <BR> and <P> tags), horizontal rules (<HR> tags), and more. Of course, all spaces, tabs, and line breaks used to format the HTML source are dealt with intelligently to eliminate extraneous spaces and line breaks in the converted text file.

Unlike other approaches for converting files, HTML to Text Converter saves time and effort by running in batch mode, converting some or all of the files in a Web project with one button click.

Customizable options allow some control of the how the text file is rendered, including choosing word-wrap, setting maximum line length, and choosing to render horizontal rules (<HR> tags) or not. If you ever need to convert HTML documents to text files, HTML PowerTools' HTML to Text Converter will be a very valuable utility in your HTML developer's toolkit.

HTML Date Stamper

Not only is it customary on the Web to include a "last modified on" date in Websites, it is an important indicator to those viewing your pages that the pages are recent and up-to-date. One thing sure to convince a browser not to return to your pages is if they are not updated frequently.

The amount of time and effort required to go into your home page and modify the date is not extreme. However, wouldn't it be beneficial to include a "this site last modified on" date stamp on the bottom of every page in your site? With the Web's new and more powerful search engines (Digital's Alta Vista is a prime example), more and more users will be entering your sites at individual pages and not through your home page. Thus, if you want to show your audience that the site is up-to-date (even if that individual page has not been recently changed), you should have a date stamp on each and every page.

The amount of time and effort to insert the current date into every page, though, is not negligible. HTML PowerTools' HTML Date Stamper will do this for you automatically, on some or all of your Website's pages, with the click of a button.

You provide a simple set of rules that tells the program where to insert the current (or some other) date in any files that you want to be affected. For example, you could define a rule as, "replace all text between the words 'Last modified: ' and the next period with today's date." A number of date and date/time formats are available to choose from.

HTML Summarizer

A key technique to allow users easy access to and navigation of your Website is to provide a detailed table of contents. This not only provides the user with a bird's eye view of your entire site, it also allows him or her to go directly to any information desired with one click. The alternative, wading through a site searching for the desired information, can be time-consuming and frustrating causing many to give up before even reaching the valuable information you provide.

Indexing an entire site to provide this service, though, is very time-consuming. This may explain why so few sites offer this advantageous service to its viewers.

HTML Summarizer will scan an entire Website and automatically create a hierarchical, hyper-linked table of contents that can be included in your home page, or a separate table of contents page. With the click of a button, you can provide your viewers with direct access to your entire site. Any time you make a change, add new pages, or remove old ones, HTML Summarizer will rebuild your table of contents automatically.

Visit our Website at http://www.tali.com


Project Window

The Project Window, which initially displays all files included the current project, is displayed when clicking Refresh File List from the main window. This window is also displayed automatically when clicking Fix Tag Pairs if the file list has not yet been refreshed. (Note: you can skip this window when clicking Fix Tag Pairs by holding down Shift or Ctrl when clicking that button.)

If you are satisfied with the file list after refreshing it, simply click OK (to return to the main window, if you clicked Refresh File List to get here) or Proceed.

Alternatively, you have three other options:

•	The Modify Project button takes you straight to the Modify Project window to make changes to the current project's definition. When returning to this window, the file list will be refreshed based on your changes to the definition.

•	The Exclude Files button allows you to temporarily exclude certain files from processing. After clicking this button, the Project window will contain two lists: one showing all files to be included in the run, and one showing all those excluded. Use the Exclude and Include buttons to move a single file from one list to the other, and use the Exclude All and Include All buttons to rapidly move all files from one list to the other.

Hint: double-clicking a file name will move it to the other list.

•	The Other button provides a dialog box for selecting a single file to be analyzed. This file may be part of a defined project, but it does not have to be. Note that this has no impact on the project definition, and is a one-time selection.


Main Window

From the main window of HTML Tag Pair Fixer you can navigate to the Project Manager and Options windows by clicking the appropriate buttons. You can also begin an analysis by clicking the Fix Tag Pairs button in the center of the window.

The name of the currently selected project is displayed at the top of the window, as well as the number of files currently selected for analysis. If you used the Project window to temporarily exclude any files from the analysis, the number of files displayed will indicate this fact.

Clicking Refresh File List will re-scan your hard disk to find all files included the project's definition. The resulting list is displayed in the Project window. There, you can temporarily exclude certain files from the analysis or jump directly to the Modify Project window, or select a single file to be analyzed instead of the entire project.

Note that it is not necessary to click Refresh File List to perform an analysis. Clicking Fix Tag Pairs will automatically cause a refresh and provide you with the opportunity to exclude files or select a single file not in the current project.

Hint: if you do not wish to see the Project window before performing an analysis, you can hold down Shift or Ctrl when clicking Fix Tag Pairs to automatically proceed straight to the analysis itself.


Project Manager Window

This window, accessible by clicking Select Project from the main window, shows a list of all currently defined Website projects. To select one for analysis, click its name and click OK.

To add a new Website project to the list, click New. The New Project window will appear.

To modify an existing project's definition, select it and click Modify. The Modify Project window will appear.

To remove a project from the list, select it and click Remove.

Note that the Cancel button in this window will not undo changes made in the New Project and Modify Project windows.


New Project/Modify Project

The New Project and Modify Project windows are identical and appear after clicking New or Modify in the Project Manager window.

After entering all the required details, click OK. To ignore all changes made (and to cancel the addition of a new project), click Cancel.

•	Project Name - Enter a descriptive name for the project up to 20 characters in length. You will use this name to identify the project. It will also appear in reports.

•	Project Code - Enter a code for the project, up to five characters in length. This code is used as a prefix for report files generated during analysis. If, for example, the project's name was Demo Website, you could use a code prefix of DEMO. The analysis report filename would be DEMO.TXT or DEMO.HTM (depending on the option selected).

•	Directory - Enter the full path of the project's root directory.

•	Browse - Click this button to browse your hard disk for the correct directory.

•	Include Subdirectories - If the project's HTML files occupy subdirectories below the specified directory, make sure this check box is checked.

•	Files to Include - Here, specify a DOS file mask for your files. Generally, this will be simply *.HTM. You may specify multiple file masks by separating them with semicolons.

•	Refresh - Click this button to ensure that your other entries specify the files that you expect. This button is located here for your convenience only, and its use is not required.

•	Files in Project - Here, you can review the files included in your project definition. After changing any of the entries in the Project Location frame, the list will be cleared. Click Refresh to re-scan the indicated files.


Analysis Window

This window is displayed while a tag pair analysis is in progress.

•	The Progress frame indicates which file is currently being analyzed, as well as the progress of the current analysis.

•	The frame below the Progress frame is used to display the details of a mismatched tag, when one is found. It has four components:

1.	The frame's title indicates the type of mismatch found, and the line number of the file where it is located. There are two types of mismatch alerts:

Found Open tag before prior Open's Close tag - This occurs when two Open tags were found in succession without a Close tag in between. In other words, it is invalid to open another pair before the previous pair was closed (unless the tag is nestable). The following, for example, would cause this alert: <B>this is bold text<B>. In such a case, the program will suggest that the second tag be changed to </B> to correct the problem.

Tag pair Close without prior Open - This occurs when a Close tag was found, but no corresponding open tag was found. The following, for example, would cause this alert: <TD>cell one</TD> </TD>cell two</TD>. In this case, a slash was accidentally inserted in the Open tag for the table's second cell. The program will suggest that the </TD> tag before the text "cell two" be changed to <TD>. A second reason this might occur is that an extraneous Close tag was inadvertently inserted in the file. For example, if a block of centered text was closed with </CENTER> but a few lines down there is another </CENTER> tag, the program will alert you.

Important note: HTML Tag Pair Fixer ignores entirely any tags not found in the currently selected HTML Rulebase. This is important, for example, when you have an open tag such as <OL> and the close tag as </OLL>. HTML Tag Pair Fixer will not flag the invalid closing tag since it is not valid HTML. Therefore, it is a good idea to always run HTML PowerAnalyzer first, to ensure that there are no unrecognized tags in the file.

2.	The top of the frame includes two lines, one blue and one red. The blue line will include the tag that HTML Tag Pair Fixer is alerting you to. The red line will display a suggested fix, immediately beneath the tag in question.

3.	There are four buttons used to indicate how you want to deal with the highlighted tag:

Change It	Clicking this button accepts the program's suggested change (as indicated in red, above). The file will be modified.

Delete It	Clicking this button removes the highlighted tag entirely, including its opening bracket <. closing bracket >, and its parameters. The file will be modified. This option is generally used when you realize that, in fact, you have two of the same tag in a row unintentionally.

Leave It	Clicking this button will ignore the highlighted tag. The file will not be modified. This option is generally useful when working with nestable tags (i.e., a pair of tags that may appear inside another pair of the same tag). A nested tag will generate an alert even if it is valid. For example, nesting one ordered list <OL> inside another is valid, but in the file itself two <OL> tags will appear before any </OL> tags.

Edit It	Clicking this button allows you to manually make changes to the tag in question. See Modify Tag  for more information.

4.	The text area is used to display a portion of the file where the mismatch was found. The tag that caused the alert is highlighted. If there are two tags involved in the mismatch (e.g., two <B>s without a </B> in between), the program will try to display both. If they are on one line, only that line will be displayed. If they are on different lines and within 50 lines of one another, both will be shown, including all the lines between them. If the displayed portion of the file is larger than what is initially visible, you can use the horizontal and vertical scrollbars to see the rest. You cannot make any changes in this window -- it is for viewing only.

•	Click the Pause button at any time to pause the analysis in progress. When in pause mode, this button will become Continue, used for continuing an analysis (ending pause mode). When in pause mode, you can click Close to abort the analysis.

Note: Any file containing one or more modifications (changed tags or deleted tags) will be modified on disk. If, in Options, Make Backup when Modifying File is checked, a backup will be saved with the specified file extension. Note: it is always advisable to maintain backups when working on critical files.

Note: It is not advisable to have any of the files to be analyzed open during analysis. Results may be unpredictable.


About HTML PowerAnalyzer
About HTML Tag Pair Fixer

HTML Tag Pair Fixer is one of Talicom's HTML PowerTools. To see which version you are using, right-click on the main window's Help button.

Please refer to http://www.tali.com for complete information about Talicom's line of HTML PowerTools for Windows.


HTML Rulebase

An HTML Rulebase is a file containing all relevant facts about the HTML markup language, and is the logical basis for all of HTML PowerAnalyzer's decisions. Rulebase files have an HRB extension and are located in the directory where the HTML PowerTools programs reside.

The contents of an HTML Rulebase can be customized using the HTML Rulebase Editor, available separately. Up-to-date Rulebase files can also be downloaded from www.tali.com.


Modify Tag

If an incorrect tag is found, but you disagree with the suggested fix, you can click Edit It to manually make changes to the tag.

Note the following:

1.	You may only make changes to the tag name itself. You cannot enter characters such as / and < and > that would be inconsistent with this.

2.	You may not erase the tag using this dialog box. To erase the tag name, click Cancel now and click Delete It in the analysis window.

3.	If you enter a valid tag name, the program will recheck your entry. It will be flagged again if determined incorrect.

4.	If what you type is unrecognized, for example /IMG which is not a valid tag name, the change will be written to the file in place of the original tag with no warning - so be careful!