Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Validating XSD itself

Tags:

java

xml

xsd

Could anyone please tell me how to validate an XSD file itself (not XML against XSD)? I have checked many forums and sites (including SO) and most of them refers some or the other online validator. But this is not a one-time check for us. Our application involves an XSL transformation using an XSD, so we need to determine whether the XSD to be used is itself in a valid format or not, as in, all the tags match, with a starting and a closing one. Certain tags aren't allowed as a child tag, etc. That's why we need a proper java code to achieve the same.

Any help would be highly appreciated.

like image 889
Sam Avatar asked Feb 14 '26 06:02

Sam


1 Answers

You can validate an XSD file against the w3 XSD schema that can be found here.

Use the same validation techniques you validate any other XML file with an XSD file, only the source document would be your XSD file.

like image 67
Oded Avatar answered Feb 15 '26 19:02

Oded



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!