|Re: Integrate xml file instead of own dsl into xtext framework [message #1051198 is a reply to message #1049710]
||Sun, 28 April 2013 07:22
| Jan Koehnlein
Registered: July 2009
You could also generate an ecore file from the XSD and directly read in |
your XML files as EMF resources. Then perform EMF validation on them.
Am 26.04.13 09:19, schrieb kon fri:
> Hey :)
> I've used Xtext for a dsl while ago and it is pretty nice! :) Now, I'm
> working in a project where xml is used instead of an own dsl. This has
> been there for a while and cannot changed anymore to a dsl.
> The current process implies tasks like parsing the actual xml file
> (jaxb), pushing all information to the EMF model and performing some
> semantical validation on the model. The maintenance is really time
> consuming and error-prone since changes have to be made on several places.
> Since this entire process is quite similar to what Xtext does (except
> for the xml file), I was wondering if I somehow could integrate the xml
> format into the Xtext framework. So far, I found two difference approaches:
> - Keep the current xml editor and adjust the ANTLR parser. E.g. ANTLR
> needs to be aware of < and > character. But this also means that I
> couldn't use the features that are provided by the Xtext editor like
> error marking, element navigation, quick fixes and so on.
> - With the second approach I would reverse engineering the current xml
> schema file with the xtext grammar dsl, like the following example:
> '<Hello>' name=ID '!</Hello>';
> What do you think? Any further suggestions? Does it seem strange :) ?
> I really appreciate your thoughts :)
> Thank you.
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com
Powered by FUDForum
. Page generated in 0.02092 seconds