- This topic has 8 replies, 3 voices, and was last updated 20 years, 9 months ago by Alfie Kirkpatrick.
-
AuthorPosts
-
Alfie KirkpatrickMemberCode 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.
Scott AndersonParticipantFor 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?
Alfie KirkpatrickMemberYes 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.
Scott AndersonParticipantTurning 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?
Alfie KirkpatrickMemberOk, 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
Alfie KirkpatrickMemberSorry, 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.
Alfie KirkpatrickMemberPut 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.
Riyad KallaMemberAlfie,
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?
Alfie KirkpatrickMemberHi 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.
-
AuthorPosts