openpreserve / jpylyzer

JP2 (JPEG 2000 Part 1) validator and properties extractor. Jpylyzer was specifically created to check that a JP2 file really conforms to the format's specifications. Additionally jpylyzer is able to extract technical characteristics.
http://jpylyzer.openpreservation.org/
Other
69 stars 28 forks source link

Check against institutional profile #75

Closed lenny001 closed 8 years ago

lenny001 commented 8 years ago

Hello,

i am trying to find out if jpylyzer can check image against institutional profile. Nothing about that is written in user manual or in informations about releases, so i suppose that no. But there was a blog post in 2012 which says that maybe next release of jpylyzer will be able to do that-so for sure i ask. Thank you in advance

bitsgalore commented 8 years ago

Checks against profiles / sets of features are possible, but not directly in jpylyzer. Instead, you can do this by post-processing jpylyzer’s output files with Schematron, which is pretty easy. See the blog post here:

http://openpreservation.org/blog/2012/09/04/automated-assessment-jp2-against-technical-profile/

There are additional schematron examples here:

https://github.com/KBNLresearch/jprofile/tree/master/jprofile/schemas

One thing to watch out for is that in the most recent jpylyzer version the output XML has its own declared namespace, so the schemas probably need to be updated for that. (Internally we’re still using an older version of jpylyzer in our production workflow, and I haven't got round to updating the schemas yet).

BTW since profile checks are so easy to implement with Schematron, I don't expect they will ever be part of jpylyzer's functionality.

lenny001 commented 8 years ago

Thank you very much for quick answer!! I already read the blog post, so i will follow that. We have most recent version of jpylyzer so i will update. Thanks again

bitsgalore commented 8 years ago

From the top of my head, I think the trick is to add the namespace declaration to the Schematron file and then use the corresponding prefix in each rule. I once did something similar for the Epubcheck tool; there's an example here:

https://github.com/KBNLresearch/epubPolicyValidate/blob/master/schemas/kbPolicy.sch

So for jpylyzer you'd have to do something similar (using jpylyzer's namespace instead).