Export Ecore model to XML Schema without EDataTyps [message #650528] |
Tue, 25 January 2011 07:38  |
Eclipse User |
|
|
|
Hi,
I've a problem with exporting an ecore model to a XML Schema. When I do so by using the "Export Model ...." function of an genmodel the XSD file uses the EDataTypes for attributes instead of the java types.
Here is my class i want to export as XML Schema:
Class: Customer
Attribute: name (type: EString)
Atttribute: id (type:EInt)
At this point I've the first question: why can I not use the normal type String and int?
Then I'Ve created an genmodel from this ecore model and export it as XML Schema.
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<xsd:schema xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:ibm="http://ibm.com.de" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ecore:nsPrefix="ibm" ecore:package="domain01" targetNamespace="http://ibm.com.de">
<xsd:import namespace="http://www.eclipse.org/emf/2002/Ecore" schemaLocation="platform:/plugin/org.eclipse.emf.ecore/model/Ecore.xsd "/>
<xsd:complexType ecore:name="customer" name="customer">
<xsd:simpleContent ecore:name="name">
<xsd:extension base="ecore:EString">
<xsd:attribute ecore:unsettable="false" name="id" type="ecore:EInt"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
</xsd:schema>
What I'm doing wrong? Do I have to import any Library so I can use the normal java types already during modelling my ecore model?
So I think you notice that I completely new at this topic, so thank you for your help.
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04055 seconds