|
Re: Programmatically creating EMF from XSD [message #424860 is a reply to message #424853] |
Fri, 07 November 2008 10:54 |
Ed Merks Messages: 33216 Registered: July 2009 |
Senior Member |
|
|
Derek,
Comments below.
Derek Palma wrote:
> Hi,
>
> I have a situation where 100s of xsd's need to be available as EMF in
> my app.
That's quite a few.
> It would be nice to not have to make the part of the build process and
> allow xsds (and their respective EMF models) to be added to the system
> at runtime.
Do you need generated code for these models or is dynamic EMF
sufficient? OSGi allows bundles to be added a runtime.
> What is the most appropriate programmatic technique for achieving this?
>
> Currently I have been looking at loading the xsds with the XSD API and
> then using its XSDEcoreBuilder like in
> http://www.theserverside.com/tt/articles/content/BindingXMLJ ava/article.html.
That seems a reasonable way.
> However, I was not sure where to get the extendedMetaData to pass to
> the XSDEcoreBuilder constructor and whether this was required or not.
There's a constructor which doesn't require one.
> I would assume that all the metadata required (the complete xsd that
> could be used to generate EMF) would be in the XSD model when the XSD
> was loaded, so this should not be required (???).
It might be the case that models in the XSDs depend on generated models
that already exist...
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.03289 seconds