Validation errors when building yFiles AJAX in Eclipse

Troubleshooting

Summary

Eclipse might be configured to treat minor validation problems as errors, even if these problems should rather be treated as warnings, because they do not prevent the yFiles AJAX demos from compiling and running successfully. This article explains how to configure Eclipse such that validation errors are treated as warnings.

Description

Eclipse validation warnings in the yFiles AJAX project

Depending on the configuration of the Eclipse IDE, minor XML/XSL/XPath/HTML validation issues may prevent successful deployment of the yFiles AJAX web application, even if the Eclipse project has been correctly configured as explained in the yFiles AJAX Readme file.

When the yFiles AJAX project has been created in Eclipse, there will be many warnings about validation failures in the XML, XSL, HTML, and even Java files included in the distribution. Usually, all of these warnings can be safely ignored. For example, the Java warnings are mostly related to the yFiles AJAX Java code being Java 1.4 compliant, which raises warnings about not using generics, if the Java Compiler is in 1.6 mode. If the Java compiler is set to 1.4 compliance mode, most of the Java warnings will go away (project properties > Java Compiler > Compiler compliance level). The HTML warnings are mostly caused by the auto-generated HTML documentation.

As treating XSL validation problems as errors is the default setting for some Eclipe distributions, we explain how to treat XSL validation issues warnings in the following as an example.

Changing the validation settings to prevent build failure

To change the configuration such that XSL issues are treated as warnings: Go to Window > Preferences > XML > XSL > Validation > XPath Problems, and switch the "Incorrect XPath syntax" selector to "Warning".

If the selector is already set to "Warning": Check if there is a project specific Validation configuration that overrides the global behavior: Project > Properties > Validation

Alternatively, XSL validation can be disabled altogether: Go to Window > Preferences > Validation, and disable the "Build" column for the "XSL Validator" row.

Now, after Rebuilding the whole project, these validation problems shouldn't prevent the yFiles AJAX demos from building anymore.

Categories this article belongs to:
yFiles AJAX > Other
Applies to:
yFiles AJAX: 1.0, 1.1, 1.2, 1.3, 1.4, 2.0
Keywords:
Eclipse - XSL - XPath - XML - validation - yFiles AJAX