-
Notifications
You must be signed in to change notification settings - Fork 13
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
Do not throw exception when importing a bad enum #120
Conversation
In this code, when creating dictionaries from Registers, the only "Enumeration" Types that are included in the output dictionaries are those with an "approved" BaseType. All others are simply omitted from the output dictionary. This is regardless of whether the Type has any Facets or not. This means that dictionaries are created in which some PropertyDefinitions reference non-existent TypeDefinitions. When regxmllib is used to generate schemas from these dictionaries an exception is thrown. I've not tested what happens if you try to process an MXF file using these dictionaries (although presumably that's OK as that issue would have shown-up in the regxmllib test suite). Either:
(Note: perhaps "incomplete" would be more accurate here than "invalid"?) This situation affects even currently "published" Registers. This is because they contain some Enumeration Types with a BaseType of "ISO7" (which is a string). These were not found earlier because none of these Types specify any Facets and therefore they have never caused any problems. On a related note: this suggests that conversion of dictionaries to schemas is not included in the regxmllib test suite -- perhaps it should be added? |
Well, let's figure out how to actually support ISO7 enumerations, and regxmllib will support them. |
@thomasheritage For enumeration, ST 2001-1 states:
Why couldn't ISO7 enumerations be turned into byte enumerations? |
To clarify:
|
@thomasheritage Thanks for the detailed report. This is a bug. Will fix. |
Add Metadictionay XSD generation tests
@thomasheritage Please review updated pull request. Elements referencing undefined types are now pruned. XSD generation tests have been added. |
I've tested this. All looks good. This should now be ready for merging. |
Closes #119