|
Re: what causes eclipse to check (or not check) xml files [message #986462 is a reply to message #986337] |
Tue, 20 November 2012 14:20 |
|
On 11/20/2012 6:40 AM, Jan de Ruiter wrote:
> I have two versions of the same project (in eclipse 3.5). In one project
> part of the java source is in a library, which makes testing difficult.
> So I created a second version of the same Dynamic Web project, where all
> the source is included.
> Both projects have identical xml files in their data part in WebContent.
> In the library version of the project eclipse complains about some xml
> files with: "The markup in the document following the root element must
> be well-formed" because it does not have a root node. Something we may
> have to fix.
> But to my surprise in the non-library version of the project the same
> file is present, and here eclipse does NOT complain. How can that be?
> Both projects use the workspace settings, so no project specific
> settings. I compared many settings, but they are all identical. The
> files have no xml-schema.
> Does anybody have a clue?
Look through Window -> Preferences -> XML and Validation.
|
|
|
|
|
|
Re: what causes eclipse to check (or not check) xml files [message #986668 is a reply to message #986554] |
Wed, 21 November 2012 10:36 |
Jan de Ruiter Messages: 6 Registered: November 2012 |
Junior Member |
|
|
Could subversion somehow have an influence?
I just realised that the library version (the one that gives the XML errors) is NOT in subversion, while the non-library version (the one that does not give errors) was initially checked out from subversion as a library, and later converted to a web project. But the xml files were added later, so they are not under version control.
So if you rightclick properties on an xml file in the first project, there is no option 'subversion' in the left panel of the popup, but if you rightclock properties on an xml file in the second project, there IS an added option 'subversion'. By the way: Clicking on that option results in subversion errors, because the file cannot be found there.
[Updated on: Wed, 21 November 2012 10:47] Report message to a moderator
|
|
|
Re: what causes eclipse to check (or not check) xml files [message #1012343 is a reply to message #986668] |
Thu, 21 February 2013 11:36 |
Jan de Ruiter Messages: 6 Registered: November 2012 |
Junior Member |
|
|
I finally found the solution myself.
I thought both projects were identical, but that was not exactly true.
In examining the .project files, I found that the project that showed the xml errors had
<buildCommand>
<name>org.eclipse.wst.validation.validationbuilder</name>
<arguments>
</arguments>
</buildCommand>
and the other project had not. After searching the internet for validationbuilder I found that this is indeed the xml checker.
Having it present in the .profile, forces all xml files to be validated after each build and/or change, causing a red cross on the faulty files.
In the other project, the same files had the same errors, and when 'validate' was done manually on such a file, the file would show the same error. But it would not automatically show after each build.
Removing this buildcommand from the .project, does not remove the red crosses, because they have already been detected. They can only be cleared by fixing the error and running validate manually.
An alternative is to remove from the workspace the file:
.metadata\.plugins\org.eclipse.core.resources\.projects\myproject\.markers
This will reset all red crosses, until the next explicit validation.
|
|
|
Powered by
FUDForum. Page generated in 0.14867 seconds