facebook

How to use Xml Schema validation??

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #279777 Reply

    D R R
    Member

    I have an XML Schema file (foo.xsd), and when I right click and choose MyEclipse->Run Validation, it seems to work because if I introduce an error in the xml schema file, I get red error indicators in the editor window and can hover over them to see what the error is.

    BUT

    now I have an XML file that references that schema, and MyEclipse->Run Validaiton doesn’t seem to do anything at all. I see no progress, no output, doesn’t look like eclipse is doing anything at all. Even if I put in a bogus name for the referenced XSD file, I get no errors or any output at all.

    How do I validate an XML file against an XML schema with MyEclipse?

    #279780 Reply

    D R R
    Member

    I kind of having it working now…I figured out that if it can’t find the xml schema file then you get no errors, no output, nothing at all to indicate anything. But if it can find the xml schema file, then it does do the validation and show the errors.

    But is there a way to see the output especially in the case where it can’t even find the xsd?

    #279818 Reply

    Loyal Water
    Member

    But is there a way to see the output especially in the case where it can’t even find the xsd?

    You mean you want to validate without the the xsd ? I’m sorry that’s not possible.

    Let me know if I misunderstood your question.

    #279895 Reply

    D R R
    Member

    No, I don’t want to validate without the XSD. What I’m saying is that if your reference to the XSD is wrong, and you run validation, you get no output at all. Did it work? Did it do anything?

    Only when you have the correct reference do you get validation to run. And again, you only see output if there are errors. If the file validates fine, you get no output at all, no way to know it really did anything.

    What I want is to know is if validation actually ran and where its output went.

    #279920 Reply

    Loyal Water
    Member

    It looks like your wanting better status messages about the validation in general, so if it couldn’t find the XSD to perform validation, you’d like to see a error message saying “No XSD found, validation cannot continue”. Is this correct?

    #280071 Reply

    D R R
    Member

    Yes, to some degree. Here are some examples of how it could behave in some use cases:
    1) you run validation on an XML document and it can’t find the referenced XSD. It therefore pops up a dialog saying “No XSD found, can’t perform validation.”
    2) you run validation on an XML document and the validation is totally successful and there are 0 errors. It pops up a dialog saying “Validation successful, no errors”
    3) you run validation on an XML document and the validation finds errors in your XML. It pops up a dialog saying “Validation found <number> errors.” And then these errors are listed in the normal “Problems” tab.
    Is this clear?

    #280082 Reply

    Loyal Water
    Member

    Yes, it is clear now. I’ll make a note of this. Thank you for your feedback.

Viewing 7 posts - 1 through 7 (of 7 total)
Reply To: How to use Xml Schema validation??

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