DTD warning in xml files [message #663046] |
Sat, 02 April 2011 14:26  |
Eclipse User |
|
|
|
I am working on an android project using the default android project setup. I am encoutering an annoying warning in all my xml files in eclipse. This warning comes in the form of a fuzzy yellow line accross all the text in the file(making it very hard to read). When I hover over this line I get the "no grammer constraints (dtd or xml) detected for document. If I right click the file and click validate it says no errors or warnings. Why eclipse chooses to tell me my xml file has no errors by putting a fuzzy yellow line through everything I have no idea.
I can run my android app on avd emulator with no problem so I assume this is just something superficial and eclipse telling me to worry about something which I don't need to at this point.
So firstly can I I remove this fuzzy underline from all my text in some kind of visual/validation preferences? I have tried changing all the "validation" settings in windows-preferences with zero effect.
Secondly, since the default android "sudoku" tutorial project didn't show these errors in xml files, I can think the only difference in my own project is the package namespace? I understand from my research though, that I was meant to choose a completley unique namespace(com.mydomainname.myprojectname)-which I have done. I can only think some kind of XML/dtd/validation reference was attached to the sudoku/tutorial project namespace that was lost when I started a new project and specified my own package namespace? Or maybe the package namespace is completley unrelated... however I did read something somewhere linking the 2 so I thought I would put it out there since it is also the only difference I can think of between my new project and the default/tutorial one.
I have <?xml version="1.0" encoding="utf-8"?> at the start of every xml file by default of course, I tried adding random xml dtds I found after this but they did not have any effect.
So I really need to know how do I either make eclipse validate my xml properly so whatever end it seems to need by configuring some xml dtd somewhere...... or simply get rid of the fuzzy yellow line in some kind of visual preference?
I have researched all these elements individually, but can't find anywhere that describes a solution to my problem specifically, all I have found are either vague references or different problems.
Any help is appreicated, even just a link to a page that describes a solution to my problem.
|
|
|
|
|
|
Re: DTD warning in xml files [message #663533 is a reply to message #663046] |
Tue, 05 April 2011 10:05  |
Eclipse User |
|
|
|
On 4/2/11 2:26 PM, droidtech1@gmail.com wrote:
> I am working on an android project using the default android project
> setup. I am encoutering an annoying warning in all my xml files in
> eclipse. This warning comes in the form of a fuzzy yellow line accross
> all the text in the file(making it very hard to read). When I hover over
> this line I get the "no grammer constraints (dtd or xml) detected for
> document. If I right click the file and click validate it says no errors
> or warnings. Why eclipse chooses to tell me my xml file has no errors by
> putting a fuzzy yellow line through everything I have no idea.
It's just a warning, not an error. It's alerting you to the fact that
the XML does not specify a DTD or Schema, so it can't validate the
grammar (it can only validate that the document is valid XML, not that
it complies with a schema or DTD).
Go to Preferences > XML > XML Files > Validation and you'll find an
option named "Indicate when no grammar is specified" which you can set
to "Ignore" if you don't want to see those warnings.
Eric
|
|
|
Powered by
FUDForum. Page generated in 0.08858 seconds