Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » Warning: no DTD/Schema detected for the document(Why?)
Warning: no DTD/Schema detected for the document [message #719807] Mon, 29 August 2011 05:37 Go to next message
MarcoGT  is currently offline MarcoGT Friend
Messages: 77
Registered: May 2011
Member
I have this xml file:

<?xml version="1.0" encoding="UTF-8"?>
<Test label="test" name="test" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xmlns:aa="http://mydomain/Schema/AA/AA" 
xmlns="http://mydomain/Schema/BB/bb" 
xsi:schemaLocation="http://mydomain/Schema/schemaTest.xsd">


And I get the warning "no DTD/Schema detected for the document"

Why?
The XSD is defined...

Thanks
Marco

[Updated on: Mon, 29 August 2011 05:44]

Report message to a moderator

Re: Warning: no DTD/Schema detected for the document [message #719938 is a reply to message #719807] Mon, 29 August 2011 14:20 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4425
Registered: July 2009
Senior Member

Are you getting any other messages about that file? As it is, it's invalid because there's no end tag for the Test start tag. That could cause the XML Validator to not be able to finish parsing (it's more strict about that than the editor) and think it never saw your attributes.

_
Nitin Dahyabhai
Eclipse Web Tools Platform
Re: Warning: no DTD/Schema detected for the document [message #719946 is a reply to message #719807] Mon, 29 August 2011 14:32 Go to previous messageGo to next message
Wolfgang Knauf is currently offline Wolfgang KnaufFriend
Messages: 63
Registered: July 2009
Member
Hi Marco,

the syntax of your schemaLocation attribute is invalid. It should map a
"xmlns" value to a URL, e.g.
xsi:schemaLocation="http://mydomain/Schema/AA/AA
http://mydomain/Schema/schemaTest.xsd"
This would map the namespace "aa" to a specific location.

Hope this helps

Wolfgang

Am 29.08.2011 07:37, schrieb MarcoGT:
> I have this xml file:
>
>
> <?xml version="1.0" encoding="UTF-8"?>
> <Test label="test" name="test"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:aa="http://mydomain/Schema/AA/AA"
> xmlns="http://mydomain/Schema/BB/bb"
> xsi:schemaLocation="http://mydomain/Schema/schemaTest.xsd">
>
>
> And I get the warning "no DTD/Schema detected for the document"
>
> Why?
>
> Thanks
> Marco
Re: Warning: no DTD/Schema detected for the document [message #720062 is a reply to message #719938] Mon, 29 August 2011 19:26 Go to previous messageGo to next message
MarcoGT  is currently offline MarcoGT Friend
Messages: 77
Registered: May 2011
Member
Nitin Dahyabhai wrote on Mon, 29 August 2011 10:20
Are you getting any other messages about that file? As it is, it's invalid because there's no end tag for the Test start tag. That could cause the XML Validator to not be able to finish parsing (it's more strict about that than the editor) and think it never saw your attributes.


My error...it did not copied all the XML file, but there is the </Test> closing tag...I only get the warning about missing schema...no any others

Thanks
Re: Warning: no DTD/Schema detected for the document [message #720063 is a reply to message #719946] Mon, 29 August 2011 19:27 Go to previous messageGo to next message
MarcoGT  is currently offline MarcoGT Friend
Messages: 77
Registered: May 2011
Member
Wolfgang Knauf wrote on Mon, 29 August 2011 10:32
Hi Marco,

the syntax of your schemaLocation attribute is invalid. It should map a
"xmlns" value to a URL, e.g.
xsi:schemaLocation="http://mydomain/Schema/AA/AA
http://mydomain/Schema/schemaTest.xsd"
This would map the namespace "aa" to a specific location.

Hope this helps


Ok, I will try with this!

Thank you.
Marco
Re: Warning: no DTD/Schema detected for the document [message #720365 is a reply to message #720063] Tue, 30 August 2011 13:17 Go to previous messageGo to next message
MarcoGT  is currently offline MarcoGT Friend
Messages: 77
Registered: May 2011
Member
Ok, with suggestion from Wolfgang now it works, thank you.

It is possible to disable the validation of ALL XML files inside workspace but keep validation for the opened XML file?
Re: Warning: no DTD/Schema detected for the document [message #720868 is a reply to message #720365] Wed, 31 August 2011 11:49 Go to previous message
Wolfgang Knauf is currently offline Wolfgang KnaufFriend
Messages: 63
Registered: July 2009
Member
Hi Marco,
>
> It is possible to disable the validation of ALL XML files inside
> workspace but keep validation for the opened XML file?

I don't think this is possible. In the project specific properties, you
have some configuration options for the XML validator (e.g.: validate
on build or only perform manual validation), and you can declare exclude
lists. But the option you request is probably not available.

Best regards

Wolfgang
Previous Topic:weird context location
Next Topic:Default XPath View
Goto Forum:
  


Current Time: Tue Mar 19 08:04:31 GMT 2024

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

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

Back to the top