Skip to content

Commit

Permalink
added minimalistic test profile and schema
Browse files Browse the repository at this point in the history
  • Loading branch information
bitsgalore committed Jul 14, 2021
1 parent a46b612 commit 07c3c33
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 0 deletions.
20 changes: 20 additions & 0 deletions jprofile/profiles/test.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0"?>

<profile>

<!-- Test
-->

<!-- Names of Schematron schemas for master, access and target images
NOTE: names only, not full paths (default location! -->

<schemaMaster>test.sch</schemaMaster>
<schemaAccess>test.sch</schemaAccess>
<schemaTargetRGB>test.sch</schemaTargetRGB>
<schemaTargetGray>test.sch</schemaTargetGray>
<schemaTargetAccessRGB>test.sch</schemaTargetAccessRGB>
<schemaTargetAccessGray>test.sch</schemaTargetAccessGray>

</profile>

31 changes: 31 additions & 0 deletions jprofile/schemas/test.sch
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?xml version="1.0"?>
<!--
Schematron jpylyzer schema: verify if JP2 conforms to
KB's profile for access copies (A.K.A. KB_ACCESS_LOSSY_01/01/2015)
Johan van der Knijff, KB / National Library of the Netherlands , 13 October 2017.
Additional checks for ICC profile and resolution
-->
<s:schema xmlns:s="http://purl.oclc.org/dsdl/schematron">
<s:ns uri="http://openpreservation.org/ns/jpylyzer/v2/" prefix="j"/>

<s:pattern>
<s:title>KB access JP2 2015, generic (no colour/resolution requirements)</s:title>

<!-- check that the file element exists -->
<s:rule context="/">
<s:assert test="j:file">no file element found</s:assert>
</s:rule>

<!-- top-level checks -->
<s:rule context="/j:file">

<!-- check that success value equals 'True' -->
<s:assert test="j:statusInfo/j:success = 'True'">jpylyzer did not run successfully</s:assert>

<!-- check that isValid element exists with the text 'True' -->
<s:assert test="j:isValid = 'True'">not valid JP2</s:assert>
</s:rule>

</s:pattern>
</s:schema>

0 comments on commit 07c3c33

Please sign in to comment.