|[Xtend] How to create an XSD schema? [message #511427]
||Mon, 01 February 2010 15:23
| Peter Keller
Registered: October 2009
I am fairly new to Xtend, and I am wondering what are good ways of using it to create and write out an XSD schema. I could write an Xpand template of course, but to me it seems better to use the XSD metamodel directly if possible: I wouldn't have to worry about getting the syntax of the output file right.
I have figured out that I can create a UML model in an XtendComponent workflow component with Xtend code like this:
create uml::Model this newModel( String name ):
create uml::Package this newPackage( uml::Model umlModel, String name ):
and write it out using XmiWriter. Is a similar approach possible using org.eclipse.xtend.typesystem.xsd.XSDMetaModel and XMLWriter? I have spent some time reading through the Xpand documentation, and also looking for examples where someone else has done this already, but without finding anything.
[Of course, I would be transforming from an input model, not creating an XSD schema from nothing. I just left that side of things out of the example above because I already know how to read a model.]
Any hints appreciated, and apologies if I have missed something obvious.
[Updated on: Mon, 01 February 2010 15:25]
Report message to a moderator
Powered by FUDForum
. Page generated in 0.02013 seconds