Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » How to represent CData,Text,comment,ProcessingInstruction in eclipse sirius(How to represent CData,Text,comment,ProcessingInstruction in eclipse sirius)
How to represent CData,Text,comment,ProcessingInstruction in eclipse sirius [message #1798444] Mon, 19 November 2018 09:50 Go to next message
Sharmila D is currently offline Sharmila DFriend
Messages: 81
Registered: June 2018
Member
Hii

Iam having an ecore which refers XMlType.ecore, Change.ecore and ecore.ecore.

How I need to create a sirius representation for Text, CData, Comment, ProcessingInstruction.in XMLType.ecore.

Please help me in this
Re: How to represent CData,Text,comment,ProcessingInstruction in eclipse sirius [message #1798461 is a reply to message #1798444] Mon, 19 November 2018 12:25 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

If your goal is to model at the XML rather than XMI level you may be interested in [1].

This is an Ecore compatible model of XML using the SAX event vocabulary to define the model.

If you install the latest QVTd [2], including the UMLX and XML feature that requires Sirius, XML/XMI files that are copied to a *.xmlmodel extension automatically open in Ecore tooling as XML rather than user metamodel instances. (This facilitates and XML2XML transformation by QVTd, or ATL or QVTo or ...)

There is a Sirius Editor (viewer with layout/delete capabilities) for *.xmlmodel files. Attached example shows the manually placed XML rendering of part of an ATL transformation.

More work is needed to make the 'editor' a full editor with create / refactor / ... capabilities and a friendly startup independent of Sirius perspectives. Any interest?

Regards

Ed Willink

[1] http://git.eclipse.org/c/mmt/org.eclipse.qvtd.git/tree/plugins/org.eclipse.qvtd.xml/model/XMLmodel.ecore
[2] http://www.eclipse.org/downloads/download.php?file=/mmt/qvtd/downloads/drops/0.17.0/S201811071319/qvtd-incubation-Update-0.17.0M2.zip
Re: How to represent CData,Text,comment,ProcessingInstruction in eclipse sirius [message #1798535 is a reply to message #1798461] Tue, 20 November 2018 09:10 Go to previous messageGo to next message
Sharmila D is currently offline Sharmila DFriend
Messages: 81
Registered: June 2018
Member
Hi Ed

Thanks for the reply.
Iam doing a project where I need to create sirius design for the model.
I have created all the elements in the model.I got stuck in the creation of highlited elements(Comment,Text,CDATA) in the attached .Please help me in this. Iam not getting what to give in domain class also. can I get any help of what to give in Domain class,Semantic Candidate Expression etc.
Iam thinking that these elements doesnt exist in my model. I found that they exist in org.eclipse.emf.ecore/model/XMLType.ecore.
How to create all these elements in sirius







Re: How to represent CData,Text,comment,ProcessingInstruction in eclipse sirius [message #1798553 is a reply to message #1798535] Tue, 20 November 2018 11:59 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

Sirius provides capabilities for creating graphical representations of models defined by Ecore metamodels.

If you want to represent CDATA etc, you need their Ecore metamodel.

Unfortunately the XML specification is a mess from a modelling perspective prompting various partial attempts at resolving the issues. XMLType resolves problems from an Ecore XSD loading perspective. It does not provide an XML metamodel as such. The QVTd XMLmodel is an XML metamodel.

Regards

Ed Willink
Re: How to represent CData,Text,comment,ProcessingInstruction in eclipse sirius [message #1799579 is a reply to message #1798535] Mon, 10 December 2018 14:08 Go to previous messageGo to next message
Sharmila D is currently offline Sharmila DFriend
Messages: 81
Registered: June 2018
Member
Hi Ed Willink
Thanks for the reply
Im trying to explain in clear.Please help me

Iam having a class which is having a feature mixed.This feature mixed will hold (text,CDATA,Comment).

mixed[ecore.xml.type: text]
mixed[ecore.xml.type: CDATA]
mixed[ecore.xml.type: Comment]

I have created the sirius representation for the class but I dont know how to create sirius representation for (text,CDATA,Comment) so that (text,CDATA,comment) needs to display as a property so that we need to allow user to give values for mixed.

Please help
Re: How to represent CData,Text,comment,ProcessingInstruction in eclipse sirius [message #1799580 is a reply to message #1799579] Mon, 10 December 2018 14:29 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

IMHO EMF's support for mixed representations is a necessary evil to provide comprehensive support for unmodeled XML/XSD. On those rare occasions when I have had to investigate it, I have found it tricky and hard to understand.

I very strongly recommend that you do use the mixed representation as part of your design. I have already pointed you at a modeled XML that avoids many of the difficulties. It already has a Sirius editor. Perhaps it needs extension, perhaps it needs XSD support too, but it appears you just ignore it.

When it comes to mixed representations you may well be on your own. I certainly cannot help. You will need to become very expert at EMF to progress. Good luck.

Regards

Ed Willink
Previous Topic:creation of elements in sirius
Next Topic:Change colour of specific node from code
Goto Forum:
  


Current Time: Thu Apr 18 10:34:39 GMT 2024

Powered by FUDForum. Page generated in 0.01916 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top