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

Schema validation errors for files in openjpeg-data #131

Closed bitsgalore closed 4 years ago

bitsgalore commented 4 years ago

Running jpylyzer on openjeg-data results in various violations of the XSD schema:

python3 ~/jpylyzer/cli.py --recurse ~/openjpeg-data/> oj-jp2.xml

Then:

xmllint --noout --schema ~/jpylyzer/xsd/jpylyzer-v-2-0.xsd oj-jp2.xml

Result:

oj-jp2.xml:4035: element qcd: Schemas validity error : Element '{http://openpreservation.org/ns/jpylyzer/v2/}qcd': Missing child element(s). Expected is one of ( {http://openpreservation.org/ns/jpylyzer/v2/}mu, {http://openpreservation.org/ns/jpylyzer/v2/}epsilon ).
oj-jp2.xml:4497: element qcd: Schemas validity error : Element '{http://openpreservation.org/ns/jpylyzer/v2/}qcd': Missing child element(s). Expected is one of ( {http://openpreservation.org/ns/jpylyzer/v2/}mu, {http://openpreservation.org/ns/jpylyzer/v2/}epsilon ).
oj-jp2.xml:19467: element bPCSign: Schemas validity error : Element '{http://openpreservation.org/ns/jpylyzer/v2/}bPCSign': This element is not expected. Expected is ( {http://openpreservation.org/ns/jpylyzer/v2/}bPCDepth ).
oj-jp2.xml:20738: element codeBlockWidth: Schemas validity error : Element '{http://openpreservation.org/ns/jpylyzer/v2/}codeBlockWidth': '27606985387162255149739023449108101809804435888681546220650096895197184' is not a valid value of the atomic type 'xs:integer'.
oj-jp2.xml:20748: element qcd: Schemas validity error : Element '{http://openpreservation.org/ns/jpylyzer/v2/}qcd': Missing child element(s). Expected is one of ( {http://openpreservation.org/ns/jpylyzer/v2/}mu, {http://openpreservation.org/ns/jpylyzer/v2/}epsilon ).
oj-jp2.xml:20863: element qcd: Schemas validity error : Element '{http://openpreservation.org/ns/jpylyzer/v2/}qcd': Missing child element(s). Expected is one of ( {http://openpreservation.org/ns/jpylyzer/v2/}mu, {http://openpreservation.org/ns/jpylyzer/v2/}epsilon ).
oj-jp2.xml:21000: element qcd: Schemas validity error : Element '{http://openpreservation.org/ns/jpylyzer/v2/}qcd': Missing child element(s). Expected is one of ( {http://openpreservation.org/ns/jpylyzer/v2/}mu, {http://openpreservation.org/ns/jpylyzer/v2/}epsilon ).
oj-jp2.xml:21132: element qcc: Schemas validity error : Element '{http://openpreservation.org/ns/jpylyzer/v2/}qcc': Missing child element(s). Expected is one of ( {http://openpreservation.org/ns/jpylyzer/v2/}mu, {http://openpreservation.org/ns/jpylyzer/v2/}epsilon ).
oj-jp2.xml:22924: element qcd: Schemas validity error : Element '{http://openpreservation.org/ns/jpylyzer/v2/}qcd': Missing child element(s). Expected is one of ( {http://openpreservation.org/ns/jpylyzer/v2/}mu, {http://openpreservation.org/ns/jpylyzer/v2/}epsilon ).
oj-jp2.xml:27201: element codeBlockHeight: Schemas validity error : Element '{http://openpreservation.org/ns/jpylyzer/v2/}codeBlockHeight': '50216813883093446110686315385661331328818843555712276103168' is not a valid value of the atomic type 'xs:integer'.
oj-jp2.xml:27412: element qcd: Schemas validity error : Element '{http://openpreservation.org/ns/jpylyzer/v2/}qcd': Missing child element(s). Expected is one of ( {http://openpreservation.org/ns/jpylyzer/v2/}mu, {http://openpreservation.org/ns/jpylyzer/v2/}epsilon ).
oj-jp2.xml:27665: element codeBlockHeight: Schemas validity error : Element '{http://openpreservation.org/ns/jpylyzer/v2/}codeBlockHeight': '50216813883093446110686315385661331328818843555712276103168' is not a valid value of the atomic type 'xs:integer'.
oj-jp2.xml:29534: element bPCSign: Schemas validity error : Element '{http://openpreservation.org/ns/jpylyzer/v2/}bPCSign': This element is not expected. Expected is ( {http://openpreservation.org/ns/jpylyzer/v2/}bPCDepth ).
oj-jp2.xml:33129: element bPCSign: Schemas validity error : Element '{http://openpreservation.org/ns/jpylyzer/v2/}bPCSign': This element is not expected. Expected is ( {http://openpreservation.org/ns/jpylyzer/v2/}bPCDepth ).
oj-jp2.xml:34546: element bPCSign: Schemas validity error : Element '{http://openpreservation.org/ns/jpylyzer/v2/}bPCSign': This element is not expected. Expected is ( {http://openpreservation.org/ns/jpylyzer/v2/}bPCDepth ).
oj-jp2.xml:35026: element qcd: Schemas validity error : Element '{http://openpreservation.org/ns/jpylyzer/v2/}qcd': Missing child element(s). Expected is one of ( {http://openpreservation.org/ns/jpylyzer/v2/}mu, {http://openpreservation.org/ns/jpylyzer/v2/}epsilon ).
oj-jp2.xml:35780: element qcd: Schemas validity error : Element '{http://openpreservation.org/ns/jpylyzer/v2/}qcd': Missing child element(s). Expected is one of ( {http://openpreservation.org/ns/jpylyzer/v2/}mu, {http://openpreservation.org/ns/jpylyzer/v2/}epsilon ).
oj-jp2.xml:37096: element qcd: Schemas validity error : Element '{http://openpreservation.org/ns/jpylyzer/v2/}qcd': Missing child element(s). Expected is one of ( {http://openpreservation.org/ns/jpylyzer/v2/}mu, {http://openpreservation.org/ns/jpylyzer/v2/}epsilon ).
oj-jp2.xml:53791: element paletteBox: Schemas validity error : Element '{http://openpreservation.org/ns/jpylyzer/v2/}paletteBox': Missing child element(s). Expected is ( {http://openpreservation.org/ns/jpylyzer/v2/}cP ).
oj-jp2.xml fails to validate

This is related to https://github.com/openpreserve/jpylyzer/issues/129

bitsgalore commented 4 years ago

Update:

reported errors for bPCSign

This seems to fix it.

reported errors for qcd

Fixed by https://github.com/openpreserve/jpylyzer/issues/129

reported errors for paletteBox

Fixed by https://github.com/openpreserve/jpylyzer/commit/df7b59c5c3bfd3a55338db04b34e61d786e2eab5

reported errors on codeBlockHeight/width

oj-jp2.xml:20738: element codeBlockWidth: Schemas validity error : Element '{http://openpreservation.org/ns/jpylyzer/v2/}codeBlockWidth': '27606985387162255149739023449108101809804435888681546220650096895197184' is not a valid value of the atomic type 'xs:integer'.

Looks like a case of this. No obvious solution, unless processing numerical fields as strings (this could happen to many other reported properties).

bitsgalore commented 4 years ago

Created separate issue for integer problem https://github.com/openpreserve/jpylyzer/issues/133, closing this one.