Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » Suppress XML Grammar warning
Suppress XML Grammar warning [message #218702] Mon, 04 August 2008 07:01 Go to next message
Eclipse User
Originally posted by: bill.damage.yahoo.com

"Warning: No grammar constraints (DTD or XML schema) detected for the
document."

This appears in a Ganymede project which uses DBunit. All the XML files do
is seed the db prior to running some unit tests. I know you'd normally
give DTD's or schemas but these are not "really" used like that. They
change so often as the db is designed its too tedious to keep a DTD up to
date.

At present I have this:

<?xml version="1.0" encoding="UTF-8"?>
<dataset>
<table name="Address">
<column>addressId</column>
<column>lastChanged</column>
...
I'm aiming for 0 warnings/ 0 errors in this project - can I suppress this
just for these

Best Regards
Re: Suppress XML Grammar warning [message #218710 is a reply to message #218702] Mon, 04 August 2008 07:26 Go to previous messageGo to next message
Eclipse User
Originally posted by: bill.damage.yahoo.com

Bill Damage wrote:

> "Warning: No grammar constraints (DTD or XML schema) detected for the
> document."

> This appears in a Ganymede project which uses DBunit. All the XML files do
> is seed the db prior to running some unit tests. I know you'd normally
> give DTD's or schemas but these are not "really" used like that. They
> change so often as the db is designed its too tedious to keep a DTD up to
> date.

> At present I have this:

> <?xml version="1.0" encoding="UTF-8"?>
> <dataset>
> <table name="Address">
> <column>addressId</column>
> <column>lastChanged</column>
> ...
> I'm aiming for 0 warnings/ 0 errors in this project - can I suppress this
> just for these

> Best Regards

Just to be a little clearer: I want to suppress just this warning - so I
still want to know if my tags are not matched etc. So far the best I can
achieve is Window | Preference | Validation then yes to "allow project to
override...", then in my project Properties | Validation | XML Validator
settings and exclude each file representing the DBunit seed data. This is
the sledgehammer way which I need to refine as described.

Best Regards
Re: Suppress XML Grammar warning [message #218724 is a reply to message #218710] Mon, 04 August 2008 08:17 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin Dahyabhai
Messages: 2131
Registered: July 2009
Senior Member
Bill Damage wrote:
> Just to be a little clearer: I want to suppress just this warning - so I
> still want to know if my tags are not matched etc. So far the best I can
> achieve is Window | Preference | Validation then yes to "allow project
> to override...", then in my project Properties | Validation | XML
> Validator settings and exclude each file representing the DBunit seed
> data. This is the sledgehammer way which I need to refine as described.

It's controllable from the "XML Files" preference page.

--
---
Nitin Dahyabhai
Eclipse WTP Source Editing
IBM Rational


---
Nitin Dahyabhai
Eclipse WTP, IBM
Re: Suppress XML Grammar warning [message #218732 is a reply to message #218710] Mon, 04 August 2008 08:25 Go to previous message
Nick Sandonato is currently offline Nick Sandonato
Messages: 125
Registered: July 2009
Senior Member
Hi Bill,

I think the preference you're looking for is under XML > XML Files in
the group Validating files. You can choose the severity to flag the "No
grammar constraints" error with. Just switch this to Ignore, and that
should fix everything up without limiting all of the other validation
features.

Nick


Bill Damage wrote:
> Bill Damage wrote:
>
>> "Warning: No grammar constraints (DTD or XML schema) detected for the
>> document."
>
>> This appears in a Ganymede project which uses DBunit. All the XML
>> files do is seed the db prior to running some unit tests. I know you'd
>> normally give DTD's or schemas but these are not "really" used like
>> that. They change so often as the db is designed its too tedious to
>> keep a DTD up to date.
>
>> At present I have this:
>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <dataset>
>> <table name="Address">
>> <column>addressId</column>
>> <column>lastChanged</column>
>> ...
>> I'm aiming for 0 warnings/ 0 errors in this project - can I suppress
>> this just for these
>
>> Best Regards
>
> Just to be a little clearer: I want to suppress just this warning - so I
> still want to know if my tags are not matched etc. So far the best I can
> achieve is Window | Preference | Validation then yes to "allow project
> to override...", then in my project Properties | Validation | XML
> Validator settings and exclude each file representing the DBunit seed
> data. This is the sledgehammer way which I need to refine as described.
>
> Best Regards
>
Previous Topic:some server config is not exist in eclipse-jee-ganymede
Next Topic:Converting non-WTP projects to WTP
Goto Forum:
  


Current Time: Wed Apr 16 18:52:56 EDT 2014

Powered by FUDForum. Page generated in 0.09448 seconds