facebook

Overambitious default setting for XML validation?

  1. MyEclipse Archived
  2.  > 
  3. Bugs
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #289518 Reply

    henk
    Member

    I just installed MyEclipse 7.0 M2 on my Mac. First of all thanks for getting the release out this quick and for supporting OS X 🙂

    Compared to MyEclipse 6.5 I noticed that the XML validation for “Indicate when no grammar is specified” is now there and set by default to “warning”. This gives a warning like this on my otherwise warning-less project:

    
    Description    Resource    Path    Location    Type
    No grammar constraints (DTD or XML schema) detected for the document.    .mymetadata    assets     line 1    XML Problem
    

    While the warning might be helpful for certain projects, I’m not really sure you should enable this by default, especially when the .mymetadata file doesn’t comply with it. Interestingly, when I created a new project with ME7, .mymetadata was not flagged with a warning. In my existent project, .classpath and .project also aren’t flagged. It seems as though the ME7 XML validator has some build-in support for excluding specific files, but some how fails for the .mymetadata in the existent project.

    Nevertheless, setting this to warning by default may still not be the best choice. Quite a lot of other files that typically aren’t under user control don’t have a DTD or XML schema, with Tomcat’s META-INF/context.xml probably being the more famous one.

    #289586 Reply

    Loyal Water
    Member

    henk,
    Thank you for pointing this out. I’ll let the dev team know about this.

    #290759 Reply

    Brad O’Hearne
    Participant

    I’m in the same boat here. Please let me know when a fix is available.

    Brad

    #290800 Reply

    Loyal Water
    Member

    Brad,
    The team is already working on this issue. I’m sorry you ran into it as well. I’ll let you know as soon as its fixed.

    #290999 Reply

    In the meantime, is there a way to disable this warning? I get it on my ant files. And I like my project to be warning-free.

    Thanks in advance,
    Florian

    #291003 Reply

    Loyal Water
    Member

    You can go to Windows > Prefs > MyEclipse > Validation and disable the XML validator or you can right click on the file and go to MyEclipse > Exclude from validation.

    #291007 Reply

    But then the whole XML validation goes away!

    Anyway, I found the answer. I should have read the first post more carefully.
    In Eclipse it is the setting.
    Window > Preferences > Web and XML > XML Files > Warn when no grammar is specified.
    In MyEclipse, it is
    Window > Preferences > MyEclipse > Files and Editors > XML > Indicate when no grammar is specified.

    And after changing the setting, right-click on you project and run the validation again.

    #291012 Reply

    Loyal Water
    Member

    Anyway, I found the answer.

    Glad you found the answer to your question.

    #291988 Reply

    mongonv
    Participant

    The fix of preferences/myeclipse/files and editors/xml and turn Indicate when no grammer is specified to ignore does not seem to work in MyEclipse 7.0 Build M2. I Turned that to ignore and the “No grammar constraints (DTD or XML schema)” warnings still come up in the problems list.

    #292235 Reply

    Loyal Water
    Member

    Can you try this with ME 7.0 GA. Do you face a similar issue?

Viewing 10 posts - 1 through 10 (of 10 total)
Reply To: Overambitious default setting for XML validation?

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