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

Metadata extension schema mechanism incorrect #916

Closed
BezrukovM opened this issue Sep 8, 2017 · 0 comments · Fixed by #947
Closed

Metadata extension schema mechanism incorrect #916

BezrukovM opened this issue Sep 8, 2017 · 0 comments · Fixed by #947
Assignees

Comments

@BezrukovM
Copy link
Contributor

Extension schema mechanism allows us to define custom schema with some properties and some value types for that schema. In case of extention of custom schema (PDF/A-2 and PDF/A-3 logic of extension custom schemas from schemas defined in document catalog metadata)

Currently veraPDF contains wrong logic: custom schema "one" can use value types from custom schema "two", which is wrong. This problem occurs because currently veraPDF for all custom schemas in ExtensionSchema definition creates one property validator with merged value types. And validates any non-standard properties with that validator. Moreover, for extended custom schemas definition (PDF/A-2, PDF/A-3 logic) it creates the similar validator with value types from document catalog and current extension schemas. After that any non-standard property firstly validates on new "extended" validator and if there is no definition for that property, then validates it on document catalog validator. Here we obtaining almost the same mistake as in main metadata validation.

As correct implementation we can change that one validator with some set of validators for each custom schema (with its own custom value types). Extension logic has to be the same with one addition: take all validators from main schema, add to them all new validators and for every extension of already saved one - add/replace properties and valueTypes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant