facebook

Selective XML validation

  1. MyEclipse IDE
  2.  > 
  3. Feature Requests
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #204140 Reply

    Code assist only seems to be available (perhaps understandably) when validation is enabled for XML files. I’d like to be able to validate selective XML documents that are not deployment descriptors, rather than the blanket option currently available.

    #204142 Reply

    Scott Anderson
    Participant

    For selective validation, you can set it to ‘off’ then right click in the editor and select ‘Validate’ from the context menu. Does this give you what you want?

    #204146 Reply

    Yes it does… and I literally just saw this in the feature list. However, I don’t have that option. I’m running 3.7RC2 on XP. I also seem to be missing a couple of checkboxes in the preferences window.

    #204147 Reply

    Scott Anderson
    Participant

    Turning off validation should be available on the XML editors preference page in RC2 at the very top. And I’m sure the validation context menu is there. Can you double check to be sure?

    #204148 Reply

    Ok, I’m an idiot… I had to reopen the file using the XML editor. I now have the validation option, but I’m still not getting code assist on elements or attributes. BTW – the missing preferences are “Don’t download uncached…” and “Suppress warning for non-default…” as compared with http://www.myeclipseide.com/index.php?module=ContentExpress&func=display&ceid=33

    #204150 Reply

    Sorry, this is definitely no longer a feature request…

    It looks like there may be a problem resolving relative DTDs. I’m getting a FileNotFoundException followed by a NullPointerException in my .log file. The XML refers to a DTD in the same directory. It appears to be looking in the eclipse install directory for it.

    #204152 Reply

    Put in full path to DTD (not ideal) and validation + code assist now works.

    While I’m here…

    – MyEclipse seems to treat DTDs as XML documents and is giving a well-formed error on the first line, even though the DTD is fine

    – Background validation, or at least validate on save would be nice, once a file has been validated manually (back to original request — validation of selected files)

    Thanks for your help…
    Alfie.

    #204159 Reply

    Riyad Kalla
    Member

    Alfie,
    The URL you references for the missing features is the 2.7/3.7 GA release, so these features will be forthcomming in 2 weeks (for 3.x users). Also validation on save is available if you leave the XML Editor configuration “Validate” setting to something other than “Nothing”. It may seem convenient in your use cases that if you manually validate once, then ME starts automatically validating every time you save, but this is actually counterintuitive to the options you have selected. If you tell MyEclipse to do no validation for you, then it won’t (but it allows YOU to do it), which is pretty straight forward IMO.

    From the way you describe your usage it sounds like you might want to consider leaving validation on? (it sounds like you are in active development). Is there a reason you are turning it off?

    #204164 Reply

    Hi Riyad, you are right, there’s no real reason for me not to keep validation on all the time for all XML docs.

    Any comment on the problem resolving doc-relative DTDs? This is pretty common and works fine for most tools/parsers. I don’t want to have to put in the full path to these files. Thanks.

Viewing 9 posts - 1 through 9 (of 9 total)
Reply To: Selective XML validation

You must be logged in to post in the forum log in