Validating with xml schema

Posted by / 27-Oct-2019 00:55

Validating with xml schema

Right-click on the file name again, select Validate, and the warning in the Problems pane should disappear and you'll see a pop-up telling you the validation completed with no errors or warnings (note that you can turn this pop-up off if you like by checking the "Do not show this dialog in future" box in the pop-up).

To demonstrate the validation is now working, try changing the spelling of any of the tags inside the You can see the full text of the error message by hovering the mouse over the line beginning with cvc-complex-type, by clicking on it and looking at the bottom of the eclipse window, or by double-clicking on it.

The other schemas are there so you can try pointing to the wrong one to see what happens.

So in the The first reference you will come to know and love, or at least recognize, as the PDS4 common namespace, in this case with a version number ("v08") indicating it is a pre-release draft.

Unless otherwise stated, everything in the label is presumed to come from the pds namespace. Because there is no namespace prefix specified, as there is for the second namespace ("xsi", in this case).

When you do that, you'll see a warning in the Problems pane below the editing pane: This is eclipse telling you that it can't do much validating unless you tell it what to validate against.

Since we have the PDS4 master schema that we want to validate against, now's the time to set up an XML Catalog entry so eclipse can turn that namespace reference into a schema file location.

validating with xml schema-18validating with xml schema-51validating with xml schema-73

If you haven't already downloaded the sample files used for the "Creating projects and importing files" demo, now would be a good time to do so.

One thought on “validating with xml schema”