-
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
Assumes that all "Enumeration" Types have an integer BaseType and raises an Exception otherwise #119
Comments
Well, how is any BaseType supposed to be represented as an
Yes. This should be fixed. |
@thomasheritage Please review PR #120 |
Thanks a lot for the quick alteration -- I'll test shortly.
As per the Registers docs this is currently only defined for a couple of cases -- in other cases the representation is not guaranteed to take any particular form. The only case so far is an Enumeration with a BaseType of string so this isn't an issue. |
It should therefore be forbidden until someone makes the effort to propose something.
This is not documented anywhere, e.g. at the Registers docs |
@thomasheritage Any luck on the testing? Thanks! If so, can you approve the PR? |
Prune properties that use undefined types Add Metadictionay XSD generation tests
Sample output (from an old version of the code, but the relevant parts don't look like they've changed):
This occurs when processing a Types Register that contains a Type with TypeKind "Enumeration" where a Facet Value is not an Integer. This will legitimately occur in the Types Register when the BaseType of the Type is a non-Integer Type.
SMPTE ST 2003:2012 Section 4.2.2 is clear that Enumerations can have any BaseType. This also the practical approach taken in managing the Types Register, as documented at https://registry.smpte-ra.org/view/draft/docs/Register%20(Types)/Type%20Kinds/Enumeration/
Therefore, regxmllib needs to expect such types when processing a Types Register and not raise an Exception.
However, SMPTE ST 2001-1:2013 Section 6.1.6 is clear that an Enumeration always has integer values.
Perhaps the best approach is for regxmllib to simply ignore any entries in the Types Register which cannot be mapped to Reg-XML.
The text was updated successfully, but these errors were encountered: