NOTE: The developer information and documentation is ongoing. If you believe that there is anything missing or inaccurate then please contact us.
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.
In v14.03+, there is a new FastCGI interface.
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.
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.
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.
To get the full path to
cmdlineprocessor.exe, try these, in order:
cmdlineprocessor.exefrom the default value for the key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\htmlval.exe
This is a 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.
In v16.0205 and above, the output is encoded using UTF-8 (with no preamble or BOM).
Versions prior to v17.0211 may contain a bug that causes the output to be generated in the wrong format.
The syntax for calling
cmdlineprocessor.exe -e,(stdout)[,0,<flags>[,<msgformat>]] <html filename to validate>
Or, with no flags parameter:
cmdlineprocessor.exe -e,(stdout) <html filename to validate>
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"
This is a bitmapped value.
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.
-e,(stdout),0,128,"%file%(%linenum%:%charnum%): %category2%%msgtext%" "$(Path)"
-e,(stdout),0,128,'%file%(%linenum%:%charnum%): %category2%%msgtext%' "$(Path)"
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 -e,<classname>,<message> <html filename to validate>
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
htmlval.exe instead of
cmdlineprocessor.exe because the registry contains the information that Windows needs to locate
For example, 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; 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.
It is the calling program's responsibility to delete the global atom and to delete the output file of the validator.
-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
-n keeps SuperHTMLEditor notified of the percentage complete. Message numbers 43 and 1 are arbitrary.
-e. Example: "
-e,SuperHTMLEditor,43,x", where x is the extra parameter
-e,SuperHTMLEditor,43,0,x", where x specifies the message to send in case of an error.
WM_USERis added to x. The error code is sent as the
lParamargument for the message. A list of error codes follows:
-fargument) to avoid having to call
cmdlineprocessor.exefor each document to validate. This significantly speeds up validation for multiple documents.
-f. Example: "
-f,x", where x is the extra parameter
-fargument. Does not affect other dialog boxes. For more silent operation, also specify the silent flag in any
CSE HTML Validator v10.0034 and above support JSON output with the appropriate option flag set (flag 16).
cmdlineprocessor.exe -e,(stdout),0,16 "c:\temp\index.html"
messagesvariable is an array of validator messages:
messagesarray (unless the flag is set to NOT output the validator messages)
['messages'][i]['messagenumber']is based on the message type, so there could be more than one message with the same message number as long as the messages have different types (one could be an error message and the other could be a warning message), but there will never be two error messages (or warning, comment, etc messages) with the same message number. Also, messages may be listed out of 'messagenumber' order.
cmdlineprocessor.exe -1" to run the validator and open the Validator Engine Options. When the user closes the dialog box, the settings will be saved and the validator will exit.
cmdlineprocessor.exe -2" to open the HTML Configuration Editor (professional and enterprise editions only).
cmdlineprocessor.exe -3" will open the Batch Wizard Options and "
-4" will open the Editor Options.
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
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:
<strong>element would be: https://www.htmlvalidator.com/help.php?m=2&h=strong (visit this help page)
fontCSS property would be: https://www.htmlvalidator.com/help.php?m=1&h=font (visit this help page)
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.
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.