Documentation is Ongoing

NOTE: The developer information and documentation is ongoing. If you believe that there is anything missing or inaccurate then please contact us.

Additional links:

Introduction

These pages describe how developers can integrate their products with the products (CSE HTML Validator for Windows) and services (online help pages) that we offer.

If you have any questions then please do not hesitate to contact us.

FastCGI interface with cmdlineprocessor.exe

In v14.03+, there is a new FastCGI interface.

Integrating Using the DLL Method

A DLL API is available to interface directly with CSE HTML Validator's validation engine. This is a more direct and powerful approach that lets you interface directly with the validator engine through its DLL. For more information, please visit the CSE HTML Validator Developer DLL Information page.

Using cmdlineprocessor.exe

The integration methods detailed on this page require using cmdlineprocessor.exe, included with CSE HTML Validator. In order to do this, first make sure there is a compatible version of CSE HTML Validator installed on the users system, then find the full path to cmdlineprocessor.exe so it can be called.

First, Check for a Compatible Version

Check ExternalCapability in the key HKEY_CURRENT_USER\SOFTWARE\AI Internet Solutions\CSE 3310 HTML Validator. It should contain a string value that is an integer and should be "9" or above. If it's less than 9 then the installed version of CSE HTML Validator is obsolete and we recommend that your application 1) not enable integration, 2) inform the user, and 3) recommend an upgrade.

Next, Get the Full Path to cmdlineprocessor.exe

To get the full path to cmdlineprocessor.exe, try these, in order:

  1. Get the path from InstallDir in HKEY_CURRENT_USER\Software\AI Internet Solutions\CSE HTML Validator v4, and the name of the executable from ValidatorEXE (should typically be cmdlineprocessor.exe)
  2. If the above fails, then try getting the full path to cmdlineprocessor.exe from the default value for the key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\htmlval.exe

Integrating Using Standard Output (stdout) (v10.0032+)

This is a new simplified method to integrate with CSE HTML Validator. It sends the output to the standard output stream so windows messaging and global atoms are not needed. See the output file format section for the format of the easily parsable output. Note that in v16.0205 and above, the output is encoded using UTF-8 (with no preamble or BOM).

The syntax for calling cmdlineprocessor.exe is

cmdlineprocessor.exe -e,(stdout)[,0,<flags>[,<msgformat>]] <html filename to validate>

Or, with no flags parameter:

cmdlineprocessor.exe -e,(stdout) <html filename to validate>

Examples:

cmdlineprocessor.exe -e,(stdout),0,4 "c:\temp\index.html"
cmdlineprocessor.exe -e,(stdout),0,4 "c:\temp\index.html" >"c:\temp\CSE Output.txt"

Flags Parameter

This is a bitmapped value.

Message Format Parameter (flag 128)

When using flag 128 (in v16.0205+) you can specify a custom message output format. Express the format as a string in single or double quotes. If this parameter is left off then the default format is used which is "%file%(%linenum%): %category2%%msgtext%". This parameter uses the same variables as specified in the $_JOB array documentation page.

Integrating Using the Old Method (with Global Atoms) (not recommended)

CSE HTML Validator can output an easily parsable validation result file that an application can easily process. Windows messaging and global atoms are used for communication.

To get this file cmdlineprocessor.exe (or htmlval.exe for older versions without cmdlineprocessor.exe) is called with command line arguments and the name of an HTML file to validate. HTML Validator validates the HTML file supplied by the command line arguments, and sends the name of the output file to the calling program by sending a message to a window of the calling program. The message contains a handle to a global atom containing the filename of the easily parsable validation results file.

The syntax for calling cmdlineprocessor.exe is

cmdlineprocessor.exe -e,<classname>,<message> <html filename to validate>

Example:

cmdlineprocessor.exe -e,SuperHTMLEditor,43 index.html

This will send the message WM_USER+43 to the window class named 'SuperHTMLEditor' using Windows API calls:

PostMessage(FindWindow("SuperHTMLEditor", NULL), (UINT)(WM_USER+atol("43")), 0, (LPARAM)hAtom)

The class name cannot contain space characters. Note that 'SuperHTMLEditor' and 43 are arbitrary- use your own name and message. There is no need to know the path to cmdlineprocessor.exe if you use a proper API command (like ShellExecute()) and htmlval.exe instead of cmdlineprocessor.exe because the registry contains the information that Windows needs to locate cmdlineprocessor.exe.

For instance, in Embarcadero Delphi/C++Builder when you receive a message from Windows, you should receive a TMessage class object. You should then be able to get the filename of the results file with code similar to the following:

ATOM hAtom; char resultsfilename[256]; hAtom=(ATOM)(Message.LParam); GlobalGetAtomName(hAtom,resultsfilename,256); GlobalDeleteAtom(hAtom);

The above copies the results filename to the character buffer resultsfilename and then deletes the global atom. For more information about the atom functions, please reference a Win32 API help file.

NOTE: It is the calling program's responsibility to delete the global atom and to delete the output file of the validator.

Status Update Messages

Using -n between lines in the text file can be used to keep your application notified of the status of the processing. For example:

-e,SuperHTMLEditor,43 c:\htmlfiles\document1.html -n SuperHTMLEditor,1,25 -e,SuperHTMLEditor,43 c:\htmlfiles\document2.html -n SuperHTMLEditor,1,50 -e,SuperHTMLEditor,43 c:\htmlfiles\document3.html -n SuperHTMLEditor,1,75 -e,SuperHTMLEditor,43 c:\htmlfiles\document4.html -n SuperHTMLEditor,1,100

Here, the -n keeps SuperHTMLEditor notified of the percentage complete. Message numbers 43 and 1 are arbitrary.

Other Options

Output Format (Original)

Example of the original output format.

Output Format (JSON)

CSE HTML Validator v10.0034 and above support JSON output with the appropriate option flag set (flag 16).

Example:

cmdlineprocessor.exe -e,(stdout),0,16 "c:\temp\index.html"

Output Format Notes

Other Useful Information

Legacy CSE HTML Validator Lite versions prior to v6.52 do not support any integration (via any method-- old or new) with other applications. Version 6.52 and above, however, do support integration with third party programs.

To see what command line arguments CSE HTML Validator and above can accept, see the documentation page about the Command Line Arguments and cmdlineprocessor.exe.

Link to our HTML & CSS Help Pages

CSE HTML Validator's editor allows its users to quickly open an online help page for an HTML or CSS element by pressing F1. These help pages are designed to be quick references and to provide links to different developer resources for more detailed information about the HTML element or CSS property. You may link to our help pages:

If you decide to link to our help pages then please let us know. We would like you to also attach an identifier to the help links, like &v=MySuperEditor.

.NET and COM Wrapper (Old)

Validating with .NET (not supported by AI Internet Solutions)

This download enables .NET programmers to build CSE HTML Validator validation into their unit tests. It works with version 7 and provides source code, Visual Studio 2005 projects and compiled help which the experienced .NET programmer can use. The download is about 630 KB in size. Not developed or supported by AI Internet Solutions. More about these .NET Web Page Testing Files.

COM DLL wrapper (by third party) is Available (not supported by AI Internet Solutions)

Download COM DLL Wrapper