-
Notifications
You must be signed in to change notification settings - Fork 68
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
Add extensibility to SBE XSD for custom tools #119
Comments
To determine the best solution, we should consider the possible needs for extensibility. Some that come to mind:
Other thoughts? |
My main concern for extensibility (as I tried to explain above) was:
So it is probably covered by your list. I am not sure how to formulate the need, but let's consider issue #120 for adding metadata to SBE schema. If SBE were allowing extra content, then we could just add DublinCore elements, similar to the example in https://www.dublincore.org/specifications/dublin-core/dc-xml-guidelines/2003-04-02/:
|
+1 for extensibility along the lines suggested by @alexeq I think all of the three points you brought up are actually all the same. The possibility to add payloads/custom fields that are processed by build tools during the build stage for doc or codegen, could also be used to define application level semantics or help define translations to/from other protocols and data structures. At the end of the day, it's basically all the same - little assumptions should probably be made on how such data is used anyway... |
I'd like to discuss some possible ways to add extensibility to SBE schema.
SBE schema has its main purpose to define the protocol "on-the-wire". In addition it contains some additional features (namely 'package' attribute, 'semanticType' attribute, custom types for identifiers) for tools that use the schema to generate code, documentation, etc. What should developer do if provided means are not enough?
I see some possible ways to impement that:
I suggest that we allow for some limited extensibility in SBE XSD by adding generic elements ('xs:anyAttribute', 'xs:any') to SBE XSD. Check https://www.ibm.com/developerworks/library/x-xtendschema/index.html, https://www.xml.com/pub/a/2004/10/27/extend.html, and
https://stackoverflow.com/questions/3347822/validating-xml-with-xsds-but-still-allow-extensibility discussion for additional links and info.
Adding 'xs:anyAttribute' with namespace="##other" would allow developers to extend SBE with custom attributes, e.g.:
More research is need to explore what 'xs:any' might provide for extensibility (whether it's needed and whether it is backward-compatible with real-logic SBE implementation).
Summarizing, I think it would be great if SBE XSD would move to what http://www.xfront.com/ExtensibleContentModels.html defines as 'open content schema': one XML file to provide both "on-the-wire" SBE format using SBE XSD and "in-place" information for all other tools (code generators, documentation formatters, etc).
The text was updated successfully, but these errors were encountered: