Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » Reading cdata from xmi model with epsilon etl(Cdata with epsilon ETL)
Reading cdata from xmi model with epsilon etl [message #1697246] Tue, 02 June 2015 16:54 Go to next message
Oscar Ortiz is currently offline Oscar OrtizFriend
Messages: 2
Registered: June 2015
Junior Member
Hi

I generated and ecore with and xsd. I'm trying to read an xmi of that model with Epsilon ETL, I want to do a model to model transformation, the xmi code is

XMI example:
<select>
<![CDATA[my data]]> </select>

XSD section:
<xs:element name='select'>
<xs:complexType mixed='true'>
<xs:attribute name='canParse' default='yes'>
<xs:simpleType>
<xs:restriction base='xs:string'>
<xs:enumeration value='yes'/>
<xs:enumeration value='no'/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name='externalQueryFile' type='xs:string' use='optional'/>
</xs:complexType>
</xs:element>

I don´t know how to read that in ETL.


Thanks!
Re: Reading cdata from xmi model with epsilon etl [message #1697279 is a reply to message #1697246] Tue, 02 June 2015 21:47 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2163
Registered: July 2009
Location: York, UK
Senior Member

Hi Oscar,

Have you generated code from your Ecore/XSD or are you trying to load the XMI model reflectively? (i.e. are the Ecore/XSD and XMI files located in the same Eclipse workspace?)

Cheers,
Dimitris
Re: Reading cdata from xmi model with epsilon etl [message #1697289 is a reply to message #1697279] Tue, 02 June 2015 22:46 Go to previous messageGo to next message
Oscar Ortiz is currently offline Oscar OrtizFriend
Messages: 2
Registered: June 2015
Junior Member
Hi Dimitris

I have generated an ecore from an xsd, the problem is when I try make a transformation model to model.


rule MyTransform
transform
root : Reports!DocumentRoot //see attachment MM
to
dest : SomeMM!Class{
var report = root.report.first();
var select = report.data.first().dataSource.first().select;

dest.attr = select.cdata; // I just don´t know how to read cdata info here

}

My XMI (in):

<?xml version="1.0" encoding="ASCII"?>
<Reports:DocumentRoot xmi:version="2.0" >
<report beforeReportTrigger="beforereport" dTDVersion="9.0.2.0.10" name="Admrmenu">
<data>
<dataSource name="ds">
<select>
<![CDATA[My cdata info here]]> </select>
</dataSource>
</data>
</report>
</Reports:DocumentRoot>


With Exeed I can add CDATA to xmi.

Thanks!
  • Attachment: mm.ecore
    (Size: 675.23KB, Downloaded 145 times)
  • Attachment: DocumentRoot.xmi
    (Size: 0.42KB, Downloaded 143 times)
Re: Reading cdata from xmi model with epsilon etl [message #1697292 is a reply to message #1697289] Tue, 02 June 2015 23:28 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2163
Registered: July 2009
Location: York, UK
Senior Member

Hi Oscar,

I'm not sure that the EMF parser reads this bit of CDATA (select.mixed returns an empty collection).

Cheers,
Dimitris

[Updated on: Tue, 02 June 2015 23:29]

Report message to a moderator

Re: Reading cdata from xmi model with epsilon etl [message #1697597 is a reply to message #1697292] Fri, 05 June 2015 09:05 Go to previous message
Horacio Hoyos is currently offline Horacio HoyosFriend
Messages: 242
Registered: October 2009
Location: Mexico
Senior Member

Hi,

I think this issue is related with something I have asked about before regarding FeatureMaps (message #1517409) and from what I recall CDATA are supposed to be read as FeatureMaps. From an XML perspective I think it makes sense that a CDATA field is a key/value pair.


Horacio Hoyos Rodriguez
Kinori Tech
Need professional support for Epsilon, EMF?
Go to: https://kinori.tech
Previous Topic:[ETL] Differences between launch file and standalone Java program
Next Topic:[EUnit] assertEqualModels fails on model with applied UML profile
Goto Forum:
  


Current Time: Thu Apr 25 10:07:59 GMT 2024

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

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

Back to the top