Tech Notes
Tech Notes |
How to validate the syntax in WebHub .whteko and .xml files
Required syntax within WHTEKO file
There are good examples in the WebHub demo files. The following DOCTYPE line is taken from the about-whFirebird.whteko file; it asks for STRICT validation.
<!DOCTYPE whteko PUBLIC "-//HREF//DTD whteko stage 2.14//Strict//EN//" "http://webhub.com/dtd/0214/whteko.dtd"> <whteko> ... </whteko>
Alternatively you can ask for TRANSITIONAL validation by using a different DTD reference.
<!DOCTYPE whteko PUBLIC "-//HREF//DTD whteko stage 2.14//Transitional//EN//" "http://webhub.com/dtd/0214/whteko.dtd"> <whteko> ... </whteko>
If you are using UTF-8 encoding, specify that FIRST, immediately followed by the DOCTYPE line, immediately followed by the opening whteko tag.
Use the first 3 lines of the webhubdemos\Live\WebHub\WHTML\Shared WHTML\lingvo-fra.whteko file (French translation file).
If you have Internet Explorer
The quickest way to make sure that an XML file has no completely fatal errors is to open it in a web browser such as Internet Explorer. IE will report gross syntax errors.
If you have Dreamweaver
Dreamweaver v8
Use this menu sequence to validate .whteko and/or .xml files: File > Check File > Validate as XML
Dreamweaver v9
File > Validate > Validate as XML
Else... use one of these free utilities
xmlvalidator
Download: http://www.kephyr.com/xmlvalidator/
This is a small program that only validates XML/DTD.
Syntax: xmlvalidator filename.whteko
Stops working on first error.
xmlstar
Download: http://xmlstar.sourceforge.net/
Multi-functional utility to work with XML.
Syntax: xml val -E filename.whteko
Returns complete list of errors.
XSD support in xmlstar is limited. You can only get valid/invalid response without exact error location:
xml val -s http://webhub.com/xsd/cv004/webhubappconfiguration200702.xsd TestConfiguration.xml
XML structure can be checked without XSD:
xml val TestConfiguration.xml
Else... use this free online validator
You can also use this online validator: http://www.w3.org/2001/03/webdata/xsv
Running DynHelp.exe v1.2.0.6 on WebHub-v2.125 built by D14
Calc time: 141 ms

