[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.tools.emf] Preserving XML comments during serialization and deserialization of XML document

I am working on a editor of a GUI meta data described as an XML document. The XML Schema is well defined and I had no problem generating the ecore model from the XML schema. My editor has two pages: a graphical presentation page and source code page. The graphical presentation page is a tree structure and the source page is rendered by the StructuredTextEditor of the Web Tools Project. The user is suppose to be able to switch between XML source code and graphical presentation doing editing in both. The problem is if I use EMF to serialize or deserialize the XML text how do I preserve XML comments.

I found a posting http://dev.eclipse.org/mhonarc/newsLists/news.eclipse.tools.emf/msg26322.html suggesting to convert all complex types to mixed content. Unfortunately, this is not an option for this project.

An article at http://www.eclipse.org/articles/Article-WTP-Persisting-EMF/persisting.html explains how to use the translator framework developed by the WTP folks. However this framework is not documented and it is internal. So I cannot really use it.

The only solution I see is to fork the WTP translation framework, and develop something similar but simpler since I do not to maintain several different version (not yet) of the schema files.

I would appreciate any suggests hints or something.

Thanks
Stefan Baramov