Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » Re: Unwanted XML warnings
Re: Unwanted XML warnings [message #223346] Sat, 01 November 2008 13:29 Go to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33107
Registered: July 2009
Senior Member
Qu0ll,

It sounds likely to be related to web tools (I assume you have the JEE
tools installed) so I've added that newsgroup to the "to" list of the
reply...


Qu0ll wrote:
> I have a number of XML files in many Java projects. For some strange
> reason, in some of those projects, Eclipse puts the warning emblem on
> the XML file icon and displays the warning "No grammar constraints
> (DTD or XML schema) detected for the document" inside the file when it
> is edited. How do I get rid of this warning and why does it only
> happen in some projects even though the XML files are identical? I
> have configured Eclipse with the "Indicate when no grammar specified =
> Ignore" option in the XML options but it still appears.
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Unwanted XML warnings [message #223362 is a reply to message #223346] Sat, 01 November 2008 22:10 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: dcarver.starstandard.org

> Qu0ll,
>
> I have a number of XML files in many Java projects. For some strange
>> reason, in some of those projects, Eclipse puts the warning emblem on
>> the XML file icon and displays the warning "No grammar constraints
>> (DTD or XML schema) detected for the document" inside the file when it
>> is edited. How do I get rid of this warning and why does it only
>> happen in some projects even though the XML files are identical? I
>> have configured Eclipse with the "Indicate when no grammar specified =
>> Ignore" option in the XML options but it still appears.
>>


If you have any of those projects setup with Projet specific validations
that could affect it as well. If you know that you never want those XML
files validated you can set up Exclusion filters for those particular
directories or projects as well. Check the Project Properties and then
the Validation option, or the Validaton option in the preferences for
setting up particular Exclusion filters.
Re: Unwanted XML warnings [message #223400 is a reply to message #223362] Mon, 03 November 2008 23:51 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Qu0llSixFour.gmail.com

"David Carver" <dcarver@starstandard.org> wrote in message
news:geik3v$q0u$1@build.eclipse.org...
>> Qu0ll,
>>
>> I have a number of XML files in many Java projects. For some strange
>>> reason, in some of those projects, Eclipse puts the warning emblem on
>>> the XML file icon and displays the warning "No grammar constraints (DTD
>>> or XML schema) detected for the document" inside the file when it is
>>> edited. How do I get rid of this warning and why does it only happen in
>>> some projects even though the XML files are identical? I have
>>> configured Eclipse with the "Indicate when no grammar specified =
>>> Ignore" option in the XML options but it still appears.
>
> If you have any of those projects setup with Projet specific validations
> that could affect it as well. If you know that you never want those XML
> files validated you can set up Exclusion filters for those particular
> directories or projects as well. Check the Project Properties and then
> the Validation option, or the Validaton option in the preferences for
> setting up particular Exclusion filters.

Thanks - setting up exclusions works just great :-)

--
And loving it,

-Qu0ll (Rare, not extinct)
_________________________________________________
Qu0llSixFour@gmail.com
[Replace the "SixFour" with numbers to email me]
Re: Unwanted XML warnings [message #223524 is a reply to message #223362] Wed, 05 November 2008 21:59 Go to previous messageGo to next message
Gabriel Indik is currently offline Gabriel IndikFriend
Messages: 16
Registered: July 2009
Junior Member
Note that you may still want to ensure that all your XML documents are
free of errors, so they shouldn’t be excluded in the validation settings.
If the "No grammar constraints (DTD or XML schema)" error message is to be
ignored, this can be set in the "XML" -> "XML Files" -> "Validating files"
preferences section. By default a warning is shown when no grammar is
specified, this can be changed to instead indicate an error or be ignored.
Re: Unwanted XML warnings [message #223623 is a reply to message #223524] Fri, 07 November 2008 05:39 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Qu0llSixFour.gmail.com

"Gabriel Indik" <gindik@ca.ibm.com> wrote in message
news:821c3bb7b3fa290c62daf13a58da101e$1@www.eclipse.org...
> Note that you may still want to ensure that all your XML documents are
> free of errors, so they shouldn’t be excluded in the validation settings.
> If the "No grammar constraints (DTD or XML schema)" error message is to be
> ignored, this can be set in the "XML" -> "XML Files" -> "Validating files"
> preferences section. By default a warning is shown when no grammar is
> specified, this can be changed to instead indicate an error or be ignored.

That's just the point - if you read my original post you will see that I
have already set that preferences option to "Ignore" but it is still
complaining about the absence of a grammar. The only way I could get it to
shut up was adding an exclusion.

--
And loving it,

-Qu0ll (Rare, not extinct)
_________________________________________________
Qu0llSixFour@gmail.com
[Replace the "SixFour" with numbers to email me]
Re: Unwanted XML warnings [message #223647 is a reply to message #223623] Fri, 07 November 2008 16:28 Go to previous messageGo to next message
Nick Sandonato is currently offline Nick SandonatoFriend
Messages: 126
Registered: July 2009
Senior Member
Qu0ll wrote:
> "Gabriel Indik" <gindik@ca.ibm.com> wrote in message
> news:821c3bb7b3fa290c62daf13a58da101e$1@www.eclipse.org...
>> Note that you may still want to ensure that all your XML documents are
>> free of errors, so they shouldn�t be excluded in the validation
>> settings. If the "No grammar constraints (DTD or XML schema)" error
>> message is to be ignored, this can be set in the "XML" -> "XML Files"
>> -> "Validating files" preferences section. By default a warning is
>> shown when no grammar is specified, this can be changed to instead
>> indicate an error or be ignored.
>
> That's just the point - if you read my original post you will see that I
> have already set that preferences option to "Ignore" but it is still
> complaining about the absence of a grammar. The only way I could get it
> to shut up was adding an exclusion.
>

After changing the "Indicate when no grammar is specified" to Ignore,
try Validating the project by right clicking on it, and then selecting
Validate.
Re: Unwanted XML warnings [message #223655 is a reply to message #223647] Fri, 07 November 2008 20:38 Go to previous message
Gabriel Indik is currently offline Gabriel IndikFriend
Messages: 16
Registered: July 2009
Junior Member
> After changing the "Indicate when no grammar is specified" to Ignore,
> try Validating the project by right clicking on it, and then selecting
> Validate.


Precisely, just like Nick pointed out, you would need to validate the
project again. This is because the warnings must have been created prior
to changing the setting to "ignore". I opened bug 254647 to address this
issue, prompting the user that a rebuild is needed for this particular
settings change to take effect.
Previous Topic:When do I use ExecutionException
Next Topic:Where to change the "definitions name" of a WSDL BEFORE deployment?
Goto Forum:
  


Current Time: Tue Mar 19 04:47:28 GMT 2024

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

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

Back to the top