Here is a summary of the changes in XML ValidatorBuddy 2.6:

Copy validation report in XMLSpy as XML

In the past it was not possible to access the validation report in the XMLSpy plugin for further processing beside scrolling through the error list and selecting the error location. Now the Schematron and Xerces tab are providing a button to copy the validation results as a new XML document in XMLSpy. The XML has the same structure as the log file generated by a batch validation.

Validate instance files with selected Schema

Validation from the Windows File Explorer supports a new command to validate one or multiple XML instance files against a selected schema file. This command overwrites any present xsi:SchemaLocation or xsi:NoNamespaceSchemaLocation. If no schema location attribute is in the XML root element the schema is loaded as NoNamespaceSchemaLocation. This functionality uses the Xerces SAX validator and is therefore also handy on validating huge files without any schema already assigned.

Creation of batch log in UTF-8

The batch log file is now written in UTF-8 encoding. The UTF-16 format without a BOM which was used in the past caused some problems on reading. Several people requested to change this to UTF-8. Of course this is the better choice anyways.

Share/Save/Bookmark

, ,

Internet Explorer is really strange. Yesterday I noticed that the empty cells in the “General” column of the generated HTML from the validation log coming from XML ValidatorBuddy were not shown. I mean no borders are around them but the <td> elements are present.

So I took a look at the CSS styles of the HTML and set the empty-cells style to “show”. No difference. IE still didn’t show the empty cells. I thought to myself: “There is a style named “empty-cells” and you can set it to “show” but even then empty cells are not shown, well …”

As usual the next step is to search the Internet. Looking for “empty-cells show” gives a lot of hits complaining that this is not working in IE. Ok, at least I’m not alone with the problem. Luckily there are also some hints how to solve it. I choose the “border-collapse: collapse” approach. How stupid I am that I didn’t know right from the start that collapsing the borders is the way to show empty cells. I mean there is nothing more obvious…

Anyways, the output of the sample XSL transformation of the ValidatorBuddy batch validation log looks much better now:

 

Validation report HTML with borders

Validation report HTML with borders

Share/Save/Bookmark

, , , ,

Having the results of the XML batch validation as a log document in XML format is nice but giving the option to automatically run a XSL transformation on the log is even nicer. Therefore I added to the upcoming release 2.5 of XML ValidatorBuddy a task which runs any stylesheet after the batch has finished to produce any other possible text output from the log file.

The batch dialog of ValidatorBuddy got the new “Transform output file” option in the Output file settings group:

Output file settings

Output file settings

On clicking the “Configure…” button a dialog appears where you can select the XSL stylesheet and the name of the output file to generate:

 

Configure output transformation

Configure output transformation

In this case ValidatorBuddy will execute the batch and take the valbuddy_log.xslt afterwards to transform the output log to the AltovaExamples.html file. Please note that you need to have the free AltovaXML parser installed in order to successfully run this transformation.

Of course you can specify any XSL here to create the output you need but the installer of ValidatorBuddy will put the sample valbuddy_log.xslt I created into the installation folder. This way you can get HTML from your log without any extra effort on your side.

To create the XSL I used the quite impressive Altova Stylevision tool. I have to admit that I’m not really an expert in writing XSL stylesheets and it would take me hours just to have this rather simple XSL working. But there is no need to be an expert in XSL when you use Stylevision. Just design the layout and select the output type you want to create from your input XML. In my case I just did a few drag-and-drop operations, added two XPath based conditions to have a green background if a file is valid and a red if the file is invalid. Then I told Stylevision to produce the XSL for me an save it. Voilà! It took me about 20 minutes and that without being a stylesheets guru.

 

Validation log transformed to HTML

Validation log transformed to HTML

All of this is available in XML ValidatorBuddy 2.5 coming soon…

Share/Save/Bookmark

, , ,