Type inheritance in XML schemas - good, bad, ugly ?
452507Feb 2 2006 — edited Apr 2 2008Consider:
Base type A exists, with some common elements.
Sub-type B "inherits" from type A (somehow), adding new elements, and potentially modifying the inherited elements.
Sub-type C inherits from type B, etc.
XML schema provides in-built mechanisms for type inheritance, such as derive by extension, derive by restriction, and so on.
Any thoughts on whether using XML's in-built inheritance mechanisms is a good idea or not ?
- Should sub-types be in their own namespace ?
- Do we have separate schemas, one per type ? Or one great big schema, containing all sub-types within that ?
- Avoid schema inheritance - each type has it's own independent schema. Propagate any "inherited" changes programatically, from the parent schemas to the sub-type schemas ?
Thoughts on this ?
Thanks,
Andy Mackie