2011年5月12日木曜日

No grammar constraints (DTD or XML schema) detected for the document

No grammar constraints (DTD or XML schema) detected for the document

この警告に対する適切な解決方法を見つけましたので報告します。
  1. 上記警告が発生しているXMLファイルを開きます。
  2. Edit>Select All>Copyします。つまり、XMLデータの全てをClipboardに入れます。
  3. カーソルを第一行目の左端に持っていきます。
  4. エンターキーを適当な回数押します。
  5. すると、おかしなことに、警告のマークも下にズレていくことが観察されます。
  6. カーソルを第一行目の左端に持っていきます。
  7. Edit>Pasteします。
  8. このPasteコマンドで張り付けたデータよりも下にあるデータを全て削除します。
  9. すると、何故か警告マークも一緒に消えてしまいます。
  10. そして警告自体も消えます。
以上のことから、この警告はEclipseのバグだろうと思います。

About this warning, many other sites have explained to operate Validation command. But I feel that this method is not appropriate. I think I found a appropriate solution as follow:.
  1. Open the file that issued the warning as such above.
  2. Operate Edit>Select All>Copy. In other words, copy all XML data into the Clipboard.
  3. Move the cursor to the left of the first line.
  4. Press the Enter key a few times.
  5. Then, oddly enough, we observe that the warning mark is going down.
  6. Move the cursor to the left of the first line.
  7. Operate Edit>Paste
  8. Delete all the data that is at lower position than the data that was pasted 
  9. Then, somehow, the warning mark is lost.
  10. And then a warning itself will disappear also.
 In conclusion, I think Eclipse bug caused this warning.

0 件のコメント:

コメントを投稿