Detailed error report on validation

Until today the free XML ValidatorBuddy shell tool, which uses the Xerces parser internally, only reported if the XML instance is valid or not. This has changed with the latest release 3.2.2 of the XML command line tool. Now it is also possible to get a detailed error report with the new -verbose option on validating one or more documents.

Just add the -verbose option to the command line to turn it on:

valbuddy.exe -v -verbose ctI031.xml
XML ValidatorBuddy command-line Tool
By xml-tools.com, Copyright 2012

C:\Users\Documents\xml\xmlschema2006-11-06\msData\complexType\ctI031.xml: invalid
Line: 3, Col: 29 : complex type ',fooType' does not permit substitution
Line: 6, Col: 12 : no declaration found for element 'fooEle3'
Line: 7, Col: 12 : element 'fooEle3' is not allowed for content model '(fooEle1,fooEle2)'

New external schema option

Not all XML instances have a schema already assigned. To successfully validate those documents one needs to specify an external schema. To accomplish this the latest release of the XML ValidatorBuddy command line tool also provides a new -s option. If the -s option has been added to the command line, the first specified path is taken as the schema file to validate all following XML instances.

valbuddy.exe -v -verbose -s ctI030.xsd ctI031.xml
XML ValidatorBuddy command-line Tool
By xml-tools.com, Copyright 2012

C:\Users\Documents\xml\xmlschema2006-11-06\msData\complexType\ctI031.xml: invalid
Line: 3, Col: 29 : complex type ',fooType' does not permit substitution

All sample files are taken from the official W3C Schema test suite and can be downloaded here: http://www.w3.org/XML/2004/xml-schema-test-suite/#releases

Share/Save/Bookmark

, , ,

One of the new features in XML validatorBuddy 3.2 is the handy Folder Suggestion Box. Previous versions of XML ValidatorBuddy didn’t have any support for a folder history on the File Explorer window. Basically the new suggestion box searches in its list of folders and presents the matching entries to the user. But the new suggestion box does not only remember the last visited folders, it also knows all directories of the currently displayed folder.

Just type in the name of a directoty or even just parts of any name you remember and the suggestion box will update itself with matching folders. All found entries are on top of the list in the box and the matching string is drawn in green.

Typing in a search string

Typing in a search string

You can then use the mouse pointer or the cursor keys to select one of the entries in the suggestion box. Hit enter or click the line to open the folder. Press ESC to close the suggestion box.

Here you can see the Folder Suggestion Box once again in action together with the rest of the File Explorer window:

Folder suggestion box and File Explorer window

Folder suggestion box and File Explorer window

Share/Save/Bookmark

, , ,

Beyond Compare is a popular and powerful differencing tool available for Windows and Linux. To complement the last blog entry about adding TortoiseMerge as an external tool here is how to add Beyond Compare to ValidatorBuddy to quickly show the differences between two XML files.

Just open the external tools page on the Options dialog and create a new entry for Beyond Compare as usual:

How to add Beyond Compare as external tool

How to add Beyond Compare as external tool

Similar to TortoiseMerge we just need to select the executable file from the “Program files” folder and specify the AllSelectedPaths variable to pass as parameter to Beyond Compare. After closing the Options dialog Beyond Compare appears as button on the bottom of the File Explorer window in ValidatorBuddy:

Beyond Compare button in File Explorer

Beyond Compare button in File Explorer

Please not that if you select more than two files Beyond Compare opens a merge session with the first three files as input and takes the fourth path as output file. Selecting two files opens a standard compare session.

Share/Save/Bookmark

,

As XML ValidatorBuddy supports external tools it is not difficult to add a differencing tool to quickly show the differences between files selected in the FileExplorer of ValidatorBuddy.

There are some very good text-based differencing tools available which are also free. As a first example I take TortoiseMerge which comes installed with TortoiseSVN and can also be downloaded separately from sourceforge as part of the TortoiseDiff package.

If you already have TortoiseMerge installed on your PC you can simply open XML ValidatorBuddy and use the External Tools page of the Options dialog to add the differencing tool. The screenshot shows a sample entry for TortoiseMerge:

TortoiseMerge as external tool

TortoiseMerge as external tool

Here TortoiseMerge is part of the TortoiseSVN installation in the programs folder.

After you have added the differencing tool to XML ValidatorBuddy you can simply select two files from the FileExplorer window and use the “TortoiseMerge” button on the bottom to show the differences.

Share/Save/Bookmark

, ,

The new XML ValidatorBuddy XMLSpy PlugIn is available for download on xml-tools.com since this week.

Now, in contrast to prior versions, the plugin has its focus on Schematron validation and enhanced schema validation of XML files using Xerces to show all validation errors at once. Those are the functionalities the majority of users always used and needed.

As a second benefit, the plugin can be purchased as a single product. Learn more here.

Share/Save/Bookmark

, , ,

Feedback from the users is actually the number one source to improve what you offer as a tool. You get valuable input what you need to do to increase the usability and very often you learn about real world use-cases you would never imagine.

I would like to invite everyone who used XML ValidatorBuddy, even if just through the trial period, to participate in this really short user survey. There are just 10 questions and all of them can be answered by a few clicks.

Click here to start the survey

Thank you very much in advance!

Share/Save/Bookmark

,

The upcoming release of XML ValidatorBuddy will include support for XML Digital Signatures. Users will be able to sign and verify one or multiple XML files at once quickly from the File Explorer window. The new features are already implemented and so it is a perfect time to show some screenshots. At first the dialog to add a signature to XML:

sign xml dialog

Sign xml dialog

As the dialog shows the DSIG implementation of XML ValidatorBuddy supports all of the important methods and types of XML digital signatures.

  • Certificates holding RSA, DSA and HMAC keys are supported.
  • MD5 and SHA hash algorithms can be used.
  • Support for exclusive canonicalization.
  • A KeyInfo element can be added to the signature to hold the public key. This way no certificate needs to be selected to verify the signature later on.
You can also use XML ValidatorBuddy to verify an XML Digital Signature. The implementation also supports multiple signatures in one file. The application reports for each file the verification results separately:

Results of XML Digital Signature verification

Results of XML Digital Signature verification

The tool either takes the public key directly from the XML file if the signature has a KeyInfo element or takes the selected certificate to retrieve the public key.

XML ValidatorBuddy 3.1 will be released in a couple of days.
Update 8/6/2011: Support for digital signatures is now available in XML ValidatorBuddy. Start to sign and verify your XML documents with a few clicks.

Share/Save/Bookmark

,

HTML Tidy is a popular tool to clean up HTML markup. The tool can be very helpful to make HTML more readable and easier to maintain. In addition it is also easy to add HTML Tidy as an external tool to XML ValidatorBuddy. You can download HTML Tidy for Windows from here.

To add HTML Tidy as an external tool just go the Tools page of the Options dialog:

HTML Tidy as external tool

HTML Tidy as external tool

Where the options are:

  • “-i” to apply automatic indentation to the markup.
  • “-raw” to keep the character enconding (works for standard 8 bit encodings).
  • “-m” to do the modifications in-place directly in the original input file.

After this simple step you can apply HTML Tidy to any .html file from the File Explorer window in XML ValidatorBuddy. This can be very convenient if you have to process a large number of input files.

Share/Save/Bookmark

, ,

This post explains how the validation against a specific schema currently works in XML ValidatorBuddy.

If you use the “Validate against a specific Schema…” functionality of XML ValidatorBuddy the tool just checks for a schemaLocation or noNamespaceSchemaLocation attribute in the XML instance file. The tool currently doesn’t check the selected schema if any targetNamespace is defined. If a schemaLocation or noNamespaceSchemaLocation attribute is present in the XML instance file, XML ValidatorBuddy just overwrites the values (of course without modifying the file) of those attributes to assign the schema for validation. If none of those attributes is present it assumes a noNamespaceSchemaLocation assignment for validation.

Now, how is it possible to validate an XML instance file without any schema assignment against a specific schema which defines a target namespace? A solution that doesn’t require to change the existing schema would be to assign a (any) schema to the XML by adding a schemaLocation attribute to the instance file. In this case XML ValidatorBuddy is also able to successfully validate the XML against any other schema file.

[Update April 14th, 2011] The enhanced “Validate against a specific Schema” command in XML ValidatorBuddy 3.0.2 checks the specified schema if a target namespace is defined and therefore supports validation of XML instance files without a schemaLocation attribute.

Share/Save/Bookmark

, , ,

XML ValidatorBuddy is not only a XML tool for validation and XSL transformation. The File Explorer tab of the desktop application provides also some very useful features to support working with a big number of files. For example:

  • The File Explorer tab offers the sub-folder scan option to get a list of all files in all sub-folders of the current directory. Together with the sorting and searching functionalities you can identify quickly files of a ceratin size, date or type.
  • With XML ValidatorBuddy you can create a XML file with the content of any folder, including sub-folders, you like. You can import this XML into Excel to get a list of all files and folders as a table or you can also create a XSL stylesheet to produce any other output you want. For example HTML or PDF.

Share/Save/Bookmark

, , , , ,