Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » what causes eclipse to check (or not check) xml files('XML problem' comes and goes without apparent reason.)
what causes eclipse to check (or not check) xml files [message #986337] Tue, 20 November 2012 07:03 Go to next message
Jan de Ruiter is currently offline Jan de RuiterFriend
Messages: 6
Registered: November 2012
Junior Member
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?
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 Go to previous messageGo to next message
Russell Bateman is currently offline Russell BatemanFriend
Messages: 3798
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

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 #986464 is a reply to message #986462] Tue, 20 November 2012 14:32 Go to previous messageGo to next message
Jan de Ruiter is currently offline Jan de RuiterFriend
Messages: 6
Registered: November 2012
Junior Member
>Look through Window -> Preferences -> XML and Validation.
This controls the global settings, which are the same for both projects.
That does NOT explain how there can be different messages for identical files.
Furthermore I cannot see any setting there that would control messages about missing root elements, and that could be switched on or off.

[Updated on: Tue, 20 November 2012 14:37]

Report message to a moderator

Re: what causes eclipse to check (or not check) xml files [message #986492 is a reply to message #986464] Tue, 20 November 2012 16:02 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4435
Registered: July 2009
Senior Member

Are both projects "built"? Are there rules on the library web project's XML Validator causing it to exclude any files from valiation?

_
Nitin Dahyabhai
Eclipse Web Tools Platform
Re: what causes eclipse to check (or not check) xml files [message #986554 is a reply to message #986492] Tue, 20 November 2012 22:20 Go to previous messageGo to next message
Jan de Ruiter is currently offline Jan de RuiterFriend
Messages: 6
Registered: November 2012
Junior Member
Both projects are built. I don't know how to set rules on the library web project's XML Validator causing files to be excluded from validation, so as far as I know: the answer is no.
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 Go to previous messageGo to next message
Jan de Ruiter is currently offline Jan de RuiterFriend
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 Go to previous message
Jan de Ruiter is currently offline Jan de RuiterFriend
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.
Previous Topic:ECLIPSE RTC - Plugin to change the Check In and Deliver label in RTC
Next Topic:SDK Version
Goto Forum:
  


Current Time: Fri Apr 19 02:34:51 GMT 2024

Powered by FUDForum. Page generated in 0.02699 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top