|No grammar constraints (DTD or XML schema) detected for the document. [message #636292]
||Sat, 30 October 2010 09:21
| Raney Mising name
Registered: September 2010
I have been using the following code for a while without any warnings.
I have installed the latest version of eclipse and am now getting the warning:
No grammar constraints (DTD or XML schema) detected for the document.
I have several suggestions of how to disable the warning.
I would like to understand the warning and fix it, not turn it off.
<?xml version="1.0" encoding="UTF-8"?>
I will get there eventually, I hope.
|Re: No grammar constraints (DTD or XML schema) detected for the document. [message #636330 is a reply to message #636292]
||Sat, 30 October 2010 19:10
| Nick Sandonato
Registered: July 2009
This message is an indicator that you have no grammar for which to validate your document's contents against, more or less. So essentially, only well-formedness is going to be checked.
By having a grammar declared, either through a DTD or Schema, we can help identify if any attributes or elements are being used that shouldn't, missing, or of the wrong type. This may help curb potential problems that might arise during processing of the XML document by whatever is handling your XML file later. It also can provide your with content assistance based on the grammar and what is expected at the cursor's current offset.
The way to fix this would be to add the DOCTYPE declaration or schema location for your grammar, if there is one. It's not the worst thing in the world to see this message, though.
Powered by FUDForum
. Page generated in 0.01482 seconds