openminted / omtd-registry-api

Other
0 stars 0 forks source link

Validation of generated OMTDS descriptors #8

Open reckart opened 7 years ago

reckart commented 7 years ago

@pennyl67 @courado Do we have some easy-to-use Java code to validate a generated OMTDS XML file against the XSDs? I would assume that the registry should do some validation of OMTDS XML files as part of importing them.

courado commented 7 years ago

I will add a validate endpoint eventually to validate against server's XSD. But in the meanwhile xmllint is command line alternative where you can validate xml and in batch mode. For xmllint you have to rewrite the email regex because for some reason it is not supported. The regex is located in OMTD-SHARE-GlobalTypes.xsd @ line 24.

reckart commented 7 years ago

I don't mean an endpoint (remote invocation) or a command-line tool. I mean a Java method.

courado commented 7 years ago

Take a look at this then. You just need to change the way the resolver finds the xsd's and they way it loads the xsd file itself.