-
Hi, I'm experimenting with Ecore.xsd and various .ecore models, like, for example, Ecore.ecore. To get a more pythonic API, I'd like to give namespace-like 'things' a Note this is not about lowering, i.e. now I wonder how I best inject such derived classes into the parse? Do I inject classes into the XmlContext.xsi_cache, via XmlContext,reset() and derivation (with a myXYZ.Meta.name = "XYZ")? I found no hooks whatsoever in the generator for this, so I want to leave that alone. PS for the $SUBJECT: I also want to build namespace trees during the parse and substitute references by the referenced object, or a trampoline in the namespace tree. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
I am thinking of adding the ability to specify a base class for all the generated models, would that fit your needs? |
Beta Was this translation helpful? Give feedback.
-
I added the ability to extend the generated classes with decorators and base classes, have a look and let me know if that works for you! The feature is on master and will be on the next release https://xsdata.readthedocs.io/en/latest/examples/extending-models.html |
Beta Was this translation helpful? Give feedback.
I added the ability to extend the generated classes with decorators and base classes, have a look and let me know if that works for you!
The feature is on master and will be on the next release
https://xsdata.readthedocs.io/en/latest/examples/extending-models.html