Eclipse XML Validation can BITE ME

There are times when I want to take an axe to Eclipse. Today’s particular grief is due to the XML editor. There are numerous faults with it (one of the biggest is that it ‘captures’ the control-pgup and control-pgdn keys into local tabs, so if you have an XML file open, and you use the keystrokes to navigate through your files, when you switch tabs to an XML file, the only way you can view a different file is to click on it), but todays stabbity-stab comes from the validator.
eclipse-48Eclipse shows you errors and warnings in realtime. Usually, they’re fairly accurate. Today I was editing a struts.xml file, and was getting a validation warning. When Eclipse senses a problem with the XML (based on it’s DTD), it tells you “this XML file fails the DTD validation”.
But it doesn’t tell you where.
This completely baffles me. “Somewhere in the following several hundred lines of XML code, there’s a problem. But I won’t tell you where or what it is.”
Off to the Validation service. I fed the XML file into it, and lo! A detailed description of the problem, and where it was:

Line 26, Column 39:
document type does not allow element "include" here.

<include file="struts-editevent.xml"/>

Was that really that difficult?


A wandering geek. Toys, shiny things, pursuits and distractions.

View all posts by

5 thoughts on “Eclipse XML Validation can BITE ME

  1. It’s not free, and I totally get why you wouldn’t want to have to jump out of Eclipse into another program just to edit an XML file, but…
    oXygen rocks so hard it’s in danger of breaking the spacetime continuum.
    Just sayin.

  2. If you can reliably reproduce this, I would suggest opening a bug report with eclipse. You also don’t mention what version of eclispe your are running. There are a LOT of errors in eclipse wtp 2.0, eclipse wtp 3.0 is much better, but still not perfect. Feel free to drop me a note, I’m a committer on the eclipse XSL Tools project so glad to help work through any issues.

  3. I have created one editor. Now i want to add the capabilities of xml editor like validating and xml content assistant to my editor. How can i do that. please can anybody help me. I am eagerly waiting for the reply. Thanks in advance.

Leave a Reply

Your email address will not be published. Required fields are marked *