Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Schema validation errors for files in openjpeg-data #131

Closed
bitsgalore opened this issue Aug 16, 2019 · 2 comments
Closed

Schema validation errors for files in openjpeg-data #131

bitsgalore opened this issue Aug 16, 2019 · 2 comments
Assignees
Labels
bug A product defect that needs fixing

Comments

@bitsgalore
Copy link
Member

bitsgalore commented Aug 16, 2019

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 #129

@bitsgalore bitsgalore added the bug A product defect that needs fixing label Aug 16, 2019
@bitsgalore bitsgalore self-assigned this Aug 16, 2019
@bitsgalore
Copy link
Member Author

bitsgalore commented Aug 16, 2019

Update:

reported errors for bPCSign

This seems to fix it.

reported errors for qcd

Fixed by #129

reported errors for paletteBox

Fixed by df7b59c

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
Copy link
Member Author

Created separate issue for integer problem #133, closing this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A product defect that needs fixing
Projects
None yet
Development

No branches or pull requests

1 participant