Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » XML Schema Definition (XSD) » Ecore XML schema mapping
Ecore XML schema mapping [message #57448] Fri, 11 February 2005 11:10 Go to next message
Eclipse UserFriend
Originally posted by: r.schlesener.gmx.net

Hy, just a short question I can't find in the docs.

Where is the mapping between Ecore models and XML schema done?

How could I map attributes in Ecore on XML Elements in place of XML
Attributes?
Re: Ecore XML schema mapping [message #57473 is a reply to message #57448] Fri, 11 February 2005 11:57 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

This is a multi-part message in MIME format.
--------------040803040404020304060801
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

Ralf,

I assume you found this document:

http://dev.eclipse.org/viewcvs/indextools.cgi/%7Echeckout%7E /emf-home/docs/overviews/XMLSchemaToEcoreMapping.pdf

The same EAnnotations that are used when mapping XSD to Ecore (which is
done by org.eclipse.xsd.ecore.XSDEcoreBuilder in the org.eclipse.xsd
plugins) can be used to mark up any Ecore model to direct how its
instances will be serialized as XML (by the reflective
serialization/deserialization code in org.eclipse.emf.ecore.xmi).


Ralf Schlesener wrote:

> Hy, just a short question I can't find in the docs.
>
> Where is the mapping between Ecore models and XML schema done?
>
> How could I map attributes in Ecore on XML Elements in place of XML
> Attributes?



--------------040803040404020304060801
Content-Type: text/html; charset=ISO-8859-15
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-15"
http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Ralf,<br>
<br>
I assume you found this document:<br>
<blockquote><a
href=" http://dev.eclipse.org/viewcvs/indextools.cgi/%7Echeckout%7E /emf-home/docs/overviews/XMLSchemaToEcoreMapping.pdf"> http://dev.eclipse.org/viewcvs/indextools.cgi/%7Echeckout%7E /emf-home/docs/overviews/XMLSchemaToEcoreMapping.pdf</a><br>
</blockquote>
The same EAnnotations that are used when mapping XSD to Ecore (which is
done by org.eclipse.xsd.ecore.XSDEcoreBuilder in the org.eclipse.xsd
plugins) can be used to mark up any Ecore model to direct how its
instances will be serialized as XML (by the reflective
serialization/deserialization code in org.eclipse.emf.ecore.xmi).<br>
<br>
<br>
Ralf Schlesener wrote:
<blockquote cite="midcui3qs$cq8$1@www.eclipse.org" type="cite">Hy, just
a short question I can't find in the docs.
<br>
<br>
Where is the mapping between Ecore models and XML schema done?
<br>
<br>
How could I map attributes in Ecore on XML Elements in place of XML
Attributes? <br>
</blockquote>
<br>
</body>
</html>

--------------040803040404020304060801--
Re: Ecore XML schema mapping [message #57498 is a reply to message #57473] Fri, 11 February 2005 12:48 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: r.schlesener.gmx.net

Ed,

does that mean I need to add the EAnnotations to a specific Ecore model?
I would like to change the general mapping for any model.

What is the XMI.xsd file, that is generated in the workspace by Eclipse
used for?


Ed Merks wrote:

> Ralf,

> I assume you found this document:

>
http://dev.eclipse.org/viewcvs/indextools.cgi/%7Echeckout%7E /emf-home/docs/overviews/XMLSchemaToEcoreMapping.pdf

> The same EAnnotations that are used when mapping XSD to Ecore (which is
> done by org.eclipse.xsd.ecore.XSDEcoreBuilder in the org.eclipse.xsd
> plugins) can be used to mark up any Ecore model to direct how its
> instances will be serialized as XML (by the reflective
> serialization/deserialization code in org.eclipse.emf.ecore.xmi).


> Ralf Schlesener wrote:

>> Hy, just a short question I can't find in the docs.
>>
>> Where is the mapping between Ecore models and XML schema done?
>>
>> How could I map attributes in Ecore on XML Elements in place of XML
>> Attributes?
Re: Ecore XML schema mapping [message #57524 is a reply to message #57498] Fri, 11 February 2005 13:30 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

This is a multi-part message in MIME format.
--------------090009060202060905000306
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

Ralf,

Yes, to specialize the serialization and deserialization of instances
you either need to mark up the model to direct the code in
org.eclipse.emf.ecore.xmi to behave differently or you need to
specialize the code to behave differently, in general.

The generated XMI.xsd and all the generated .xsd files for that matter,
are not used for anything. They are generated for you to use directly
for whatever purpose requires a schema that *approximates *the grammar
for instances.


Ralf Schlesener wrote:

> Ed,
>
> does that mean I need to add the EAnnotations to a specific Ecore model?
> I would like to change the general mapping for any model.
>
> What is the XMI.xsd file, that is generated in the workspace by
> Eclipse used for?
>
>
> Ed Merks wrote:
>
>> Ralf,
>
>
>> I assume you found this document:
>
>
>>
>
> http://dev.eclipse.org/viewcvs/indextools.cgi/%7Echeckout%7E /emf-home/docs/overviews/XMLSchemaToEcoreMapping.pdf
>
>
>> The same EAnnotations that are used when mapping XSD to Ecore (which
>> is done by org.eclipse.xsd.ecore.XSDEcoreBuilder in the
>> org.eclipse.xsd plugins) can be used to mark up any Ecore model to
>> direct how its instances will be serialized as XML (by the reflective
>> serialization/deserialization code in org.eclipse.emf.ecore.xmi).
>
>
>
>> Ralf Schlesener wrote:
>
>
>>> Hy, just a short question I can't find in the docs.
>>>
>>> Where is the mapping between Ecore models and XML schema done?
>>>
>>> How could I map attributes in Ecore on XML Elements in place of XML
>>> Attributes?
>>
>
>


--------------090009060202060905000306
Content-Type: text/html; charset=ISO-8859-15
Content-Transfer-Encoding: 8bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-15"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Ralf,<br>
<br>
Yes, to specialize the serialization and deserialization of instances
you either need to mark up the model to direct the code in
org.eclipse.emf.ecore.xmi to behave differently or you need to
specialize the code to behave differently, in general.<br>
<br>
The generated XMI.xsd and all the generated .xsd files for that matter,
are not used for anything.
Re: Ecore XML schema mapping [message #57548 is a reply to message #57524] Fri, 11 February 2005 14:17 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: r.schlesener.gmx.net

Ed,

reading the javadoc it looks like I need to change getXMLRepresentation()
in XMLInfoImpl, to map Ecore attributes to XML elements. Is that the right
spot?


Ed Merks wrote:

> Ralf,

> Yes, to specialize the serialization and deserialization of instances
> you either need to mark up the model to direct the code in
> org.eclipse.emf.ecore.xmi to behave differently or you need to
> specialize the code to behave differently, in general.

> The generated XMI.xsd and all the generated .xsd files for that matter,
> are not used for anything. They are generated for you to use directly
> for whatever purpose requires a schema that *approximates *the grammar
> for instances.


> Ralf Schlesener wrote:

>> Ed,
>>
>> does that mean I need to add the EAnnotations to a specific Ecore model?
>> I would like to change the general mapping for any model.
>>
>> What is the XMI.xsd file, that is generated in the workspace by
>> Eclipse used for?
>>
>>
>> Ed Merks wrote:
>>
>>> Ralf,
>>
>>
>>> I assume you found this document:
>>
>>
>>>
>>
>>
http://dev.eclipse.org/viewcvs/indextools.cgi/%7Echeckout%7E /emf-home/docs/overviews/XMLSchemaToEcoreMapping.pdf
>>
>>
>>> The same EAnnotations that are used when mapping XSD to Ecore (which
>>> is done by org.eclipse.xsd.ecore.XSDEcoreBuilder in the
>>> org.eclipse.xsd plugins) can be used to mark up any Ecore model to
>>> direct how its instances will be serialized as XML (by the reflective
>>> serialization/deserialization code in org.eclipse.emf.ecore.xmi).
>>
>>
>>
>>> Ralf Schlesener wrote:
>>
>>
>>>> Hy, just a short question I can't find in the docs.
>>>>
>>>> Where is the mapping between Ecore models and XML schema done?
>>>>
>>>> How could I map attributes in Ecore on XML Elements in place of XML
>>>> Attributes?
>>>
>>
>>
Re: Ecore XML schema mapping [message #57572 is a reply to message #57548] Fri, 11 February 2005 14:41 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Ralf,

Yes.


Ralf Schlesener wrote:

> Ed,
>
> reading the javadoc it looks like I need to change
> getXMLRepresentation() in XMLInfoImpl, to map Ecore attributes to XML
> elements. Is that the right spot?
>
>
> Ed Merks wrote:
>
>> Ralf,
>
>
>> Yes, to specialize the serialization and deserialization of instances
>> you either need to mark up the model to direct the code in
>> org.eclipse.emf.ecore.xmi to behave differently or you need to
>> specialize the code to behave differently, in general.
>
>
>> The generated XMI.xsd and all the generated .xsd files for that
>> matter, are not used for anything. They are generated for you to
>> use directly for whatever purpose requires a schema that
>> *approximates *the grammar for instances.
>
>
>
>> Ralf Schlesener wrote:
>
>
>>> Ed,
>>>
>>> does that mean I need to add the EAnnotations to a specific Ecore
>>> model?
>>> I would like to change the general mapping for any model.
>>>
>>> What is the XMI.xsd file, that is generated in the workspace by
>>> Eclipse used for?
>>>
>>>
>>> Ed Merks wrote:
>>>
>>>> Ralf,
>>>
>>>
>>>
>>>> I assume you found this document:
>>>
>>>
>>>
>>>>
>>>
>>>
>>>
> http://dev.eclipse.org/viewcvs/indextools.cgi/%7Echeckout%7E /emf-home/docs/overviews/XMLSchemaToEcoreMapping.pdf
>
>
>>>
>>>
>>>> The same EAnnotations that are used when mapping XSD to Ecore
>>>> (which is done by org.eclipse.xsd.ecore.XSDEcoreBuilder in the
>>>> org.eclipse.xsd plugins) can be used to mark up any Ecore model to
>>>> direct how its instances will be serialized as XML (by the
>>>> reflective serialization/deserialization code in
>>>> org.eclipse.emf.ecore.xmi).
>>>
>>>
>>>
>>>
>>>> Ralf Schlesener wrote:
>>>
>>>
>>>
>>>>> Hy, just a short question I can't find in the docs.
>>>>>
>>>>> Where is the mapping between Ecore models and XML schema done?
>>>>>
>>>>> How could I map attributes in Ecore on XML Elements in place of
>>>>> XML Attributes?
>>>>
>>>>
>>>
>>>
>
>
Re: Ecore XML schema mapping [message #57595 is a reply to message #57572] Fri, 11 February 2005 15:03 Go to previous message
Eclipse UserFriend
Originally posted by: r.schlesener.gmx.net

Ed,

thanks for your help, I will try that.
Ralf

Ed Merks wrote:

> Ralf,

> Yes.


> Ralf Schlesener wrote:

>> Ed,
>>
>> reading the javadoc it looks like I need to change
>> getXMLRepresentation() in XMLInfoImpl, to map Ecore attributes to XML
>> elements. Is that the right spot?
>>
>>
>> Ed Merks wrote:
>>
>>> Ralf,
>>
>>
>>> Yes, to specialize the serialization and deserialization of instances
>>> you either need to mark up the model to direct the code in
>>> org.eclipse.emf.ecore.xmi to behave differently or you need to
>>> specialize the code to behave differently, in general.
>>
>>
>>> The generated XMI.xsd and all the generated .xsd files for that
>>> matter, are not used for anything. They are generated for you to
>>> use directly for whatever purpose requires a schema that
>>> *approximates *the grammar for instances.
>>
>>
>>
>>> Ralf Schlesener wrote:
>>
>>
>>>> Ed,
>>>>
>>>> does that mean I need to add the EAnnotations to a specific Ecore
>>>> model?
>>>> I would like to change the general mapping for any model.
>>>>
>>>> What is the XMI.xsd file, that is generated in the workspace by
>>>> Eclipse used for?
>>>>
>>>>
>>>> Ed Merks wrote:
>>>>
>>>>> Ralf,
>>>>
>>>>
>>>>
>>>>> I assume you found this document:
>>>>
>>>>
>>>>
>>>>>
>>>>
>>>>
>>>>
>>
http://dev.eclipse.org/viewcvs/indextools.cgi/%7Echeckout%7E /emf-home/docs/overviews/XMLSchemaToEcoreMapping.pdf
>>
>>
>>>>
>>>>
>>>>> The same EAnnotations that are used when mapping XSD to Ecore
>>>>> (which is done by org.eclipse.xsd.ecore.XSDEcoreBuilder in the
>>>>> org.eclipse.xsd plugins) can be used to mark up any Ecore model to
>>>>> direct how its instances will be serialized as XML (by the
>>>>> reflective serialization/deserialization code in
>>>>> org.eclipse.emf.ecore.xmi).
>>>>
>>>>
>>>>
>>>>
>>>>> Ralf Schlesener wrote:
>>>>
>>>>
>>>>
>>>>>> Hy, just a short question I can't find in the docs.
>>>>>>
>>>>>> Where is the mapping between Ecore models and XML schema done?
>>>>>>
>>>>>> How could I map attributes in Ecore on XML Elements in place of
>>>>>> XML Attributes?
>>>>>
>>>>>
>>>>
>>>>
>>
>>
Re: Ecore XML schema mapping [message #593812 is a reply to message #57448] Fri, 11 February 2005 11:57 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33183
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------040803040404020304060801
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

Ralf,

I assume you found this document:

http://dev.eclipse.org/viewcvs/indextools.cgi/%7Echeckout%7E /emf-home/docs/overviews/XMLSchemaToEcoreMapping.pdf

The same EAnnotations that are used when mapping XSD to Ecore (which is
done by org.eclipse.xsd.ecore.XSDEcoreBuilder in the org.eclipse.xsd
plugins) can be used to mark up any Ecore model to direct how its
instances will be serialized as XML (by the reflective
serialization/deserialization code in org.eclipse.emf.ecore.xmi).


Ralf Schlesener wrote:

> Hy, just a short question I can't find in the docs.
>
> Where is the mapping between Ecore models and XML schema done?
>
> How could I map attributes in Ecore on XML Elements in place of XML
> Attributes?



--------------040803040404020304060801
Content-Type: text/html; charset=ISO-8859-15
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-15"
http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Ralf,<br>
<br>
I assume you found this document:<br>
<blockquote><a
href=" http://dev.eclipse.org/viewcvs/indextools.cgi/%7Echeckout%7E /emf-home/docs/overviews/XMLSchemaToEcoreMapping.pdf"> http://dev.eclipse.org/viewcvs/indextools.cgi/%7Echeckout%7E /emf-home/docs/overviews/XMLSchemaToEcoreMapping.pdf</a><br>
</blockquote>
The same EAnnotations that are used when mapping XSD to Ecore (which is
done by org.eclipse.xsd.ecore.XSDEcoreBuilder in the org.eclipse.xsd
plugins) can be used to mark up any Ecore model to direct how its
instances will be serialized as XML (by the reflective
serialization/deserialization code in org.eclipse.emf.ecore.xmi).<br>
<br>
<br>
Ralf Schlesener wrote:
<blockquote cite="midcui3qs$cq8$1@www.eclipse.org" type="cite">Hy, just
a short question I can't find in the docs.
<br>
<br>
Where is the mapping between Ecore models and XML schema done?
<br>
<br>
How could I map attributes in Ecore on XML Elements in place of XML
Attributes? <br>
</blockquote>
<br>
</body>
</html>

--------------040803040404020304060801--


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Ecore XML schema mapping [message #593837 is a reply to message #57473] Fri, 11 February 2005 12:48 Go to previous message
Eclipse UserFriend
Originally posted by: r.schlesener.gmx.net

Ed,

does that mean I need to add the EAnnotations to a specific Ecore model?
I would like to change the general mapping for any model.

What is the XMI.xsd file, that is generated in the workspace by Eclipse
used for?


Ed Merks wrote:

> Ralf,

> I assume you found this document:

>
http://dev.eclipse.org/viewcvs/indextools.cgi/%7Echeckout%7E /emf-home/docs/overviews/XMLSchemaToEcoreMapping.pdf

> The same EAnnotations that are used when mapping XSD to Ecore (which is
> done by org.eclipse.xsd.ecore.XSDEcoreBuilder in the org.eclipse.xsd
> plugins) can be used to mark up any Ecore model to direct how its
> instances will be serialized as XML (by the reflective
> serialization/deserialization code in org.eclipse.emf.ecore.xmi).


> Ralf Schlesener wrote:

>> Hy, just a short question I can't find in the docs.
>>
>> Where is the mapping between Ecore models and XML schema done?
>>
>> How could I map attributes in Ecore on XML Elements in place of XML
>> Attributes?
Re: Ecore XML schema mapping [message #593850 is a reply to message #57498] Fri, 11 February 2005 13:30 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33183
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------090009060202060905000306
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

Ralf,

Yes, to specialize the serialization and deserialization of instances
you either need to mark up the model to direct the code in
org.eclipse.emf.ecore.xmi to behave differently or you need to
specialize the code to behave differently, in general.

The generated XMI.xsd and all the generated .xsd files for that matter,
are not used for anything. They are generated for you to use directly
for whatever purpose requires a schema that *approximates *the grammar
for instances.


Ralf Schlesener wrote:

> Ed,
>
> does that mean I need to add the EAnnotations to a specific Ecore model?
> I would like to change the general mapping for any model.
>
> What is the XMI.xsd file, that is generated in the workspace by
> Eclipse used for?
>
>
> Ed Merks wrote:
>
>> Ralf,
>
>
>> I assume you found this document:
>
>
>>
>
> http://dev.eclipse.org/viewcvs/indextools.cgi/%7Echeckout%7E /emf-home/docs/overviews/XMLSchemaToEcoreMapping.pdf
>
>
>> The same EAnnotations that are used when mapping XSD to Ecore (which
>> is done by org.eclipse.xsd.ecore.XSDEcoreBuilder in the
>> org.eclipse.xsd plugins) can be used to mark up any Ecore model to
>> direct how its instances will be serialized as XML (by the reflective
>> serialization/deserialization code in org.eclipse.emf.ecore.xmi).
>
>
>
>> Ralf Schlesener wrote:
>
>
>>> Hy, just a short question I can't find in the docs.
>>>
>>> Where is the mapping between Ecore models and XML schema done?
>>>
>>> How could I map attributes in Ecore on XML Elements in place of XML
>>> Attributes?
>>
>
>


--------------090009060202060905000306
Content-Type: text/html; charset=ISO-8859-15
Content-Transfer-Encoding: 8bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-15"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Ralf,<br>
<br>
Yes, to specialize the serialization and deserialization of instances
you either need to mark up the model to direct the code in
org.eclipse.emf.ecore.xmi to behave differently or you need to
specialize the code to behave differently, in general.<br>
<br>
The generated XMI.xsd and all the generated .xsd files for that matter,
are not used for anything.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Ecore XML schema mapping [message #593883 is a reply to message #57524] Fri, 11 February 2005 14:17 Go to previous message
Eclipse UserFriend
Originally posted by: r.schlesener.gmx.net

Ed,

reading the javadoc it looks like I need to change getXMLRepresentation()
in XMLInfoImpl, to map Ecore attributes to XML elements. Is that the right
spot?


Ed Merks wrote:

> Ralf,

> Yes, to specialize the serialization and deserialization of instances
> you either need to mark up the model to direct the code in
> org.eclipse.emf.ecore.xmi to behave differently or you need to
> specialize the code to behave differently, in general.

> The generated XMI.xsd and all the generated .xsd files for that matter,
> are not used for anything. They are generated for you to use directly
> for whatever purpose requires a schema that *approximates *the grammar
> for instances.


> Ralf Schlesener wrote:

>> Ed,
>>
>> does that mean I need to add the EAnnotations to a specific Ecore model?
>> I would like to change the general mapping for any model.
>>
>> What is the XMI.xsd file, that is generated in the workspace by
>> Eclipse used for?
>>
>>
>> Ed Merks wrote:
>>
>>> Ralf,
>>
>>
>>> I assume you found this document:
>>
>>
>>>
>>
>>
http://dev.eclipse.org/viewcvs/indextools.cgi/%7Echeckout%7E /emf-home/docs/overviews/XMLSchemaToEcoreMapping.pdf
>>
>>
>>> The same EAnnotations that are used when mapping XSD to Ecore (which
>>> is done by org.eclipse.xsd.ecore.XSDEcoreBuilder in the
>>> org.eclipse.xsd plugins) can be used to mark up any Ecore model to
>>> direct how its instances will be serialized as XML (by the reflective
>>> serialization/deserialization code in org.eclipse.emf.ecore.xmi).
>>
>>
>>
>>> Ralf Schlesener wrote:
>>
>>
>>>> Hy, just a short question I can't find in the docs.
>>>>
>>>> Where is the mapping between Ecore models and XML schema done?
>>>>
>>>> How could I map attributes in Ecore on XML Elements in place of XML
>>>> Attributes?
>>>
>>
>>
Re: Ecore XML schema mapping [message #593906 is a reply to message #57548] Fri, 11 February 2005 14:41 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33183
Registered: July 2009
Senior Member
Ralf,

Yes.


Ralf Schlesener wrote:

> Ed,
>
> reading the javadoc it looks like I need to change
> getXMLRepresentation() in XMLInfoImpl, to map Ecore attributes to XML
> elements. Is that the right spot?
>
>
> Ed Merks wrote:
>
>> Ralf,
>
>
>> Yes, to specialize the serialization and deserialization of instances
>> you either need to mark up the model to direct the code in
>> org.eclipse.emf.ecore.xmi to behave differently or you need to
>> specialize the code to behave differently, in general.
>
>
>> The generated XMI.xsd and all the generated .xsd files for that
>> matter, are not used for anything. They are generated for you to
>> use directly for whatever purpose requires a schema that
>> *approximates *the grammar for instances.
>
>
>
>> Ralf Schlesener wrote:
>
>
>>> Ed,
>>>
>>> does that mean I need to add the EAnnotations to a specific Ecore
>>> model?
>>> I would like to change the general mapping for any model.
>>>
>>> What is the XMI.xsd file, that is generated in the workspace by
>>> Eclipse used for?
>>>
>>>
>>> Ed Merks wrote:
>>>
>>>> Ralf,
>>>
>>>
>>>
>>>> I assume you found this document:
>>>
>>>
>>>
>>>>
>>>
>>>
>>>
> http://dev.eclipse.org/viewcvs/indextools.cgi/%7Echeckout%7E /emf-home/docs/overviews/XMLSchemaToEcoreMapping.pdf
>
>
>>>
>>>
>>>> The same EAnnotations that are used when mapping XSD to Ecore
>>>> (which is done by org.eclipse.xsd.ecore.XSDEcoreBuilder in the
>>>> org.eclipse.xsd plugins) can be used to mark up any Ecore model to
>>>> direct how its instances will be serialized as XML (by the
>>>> reflective serialization/deserialization code in
>>>> org.eclipse.emf.ecore.xmi).
>>>
>>>
>>>
>>>
>>>> Ralf Schlesener wrote:
>>>
>>>
>>>
>>>>> Hy, just a short question I can't find in the docs.
>>>>>
>>>>> Where is the mapping between Ecore models and XML schema done?
>>>>>
>>>>> How could I map attributes in Ecore on XML Elements in place of
>>>>> XML Attributes?
>>>>
>>>>
>>>
>>>
>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Ecore XML schema mapping [message #593923 is a reply to message #57572] Fri, 11 February 2005 15:03 Go to previous message
Eclipse UserFriend
Originally posted by: r.schlesener.gmx.net

Ed,

thanks for your help, I will try that.
Ralf

Ed Merks wrote:

> Ralf,

> Yes.


> Ralf Schlesener wrote:

>> Ed,
>>
>> reading the javadoc it looks like I need to change
>> getXMLRepresentation() in XMLInfoImpl, to map Ecore attributes to XML
>> elements. Is that the right spot?
>>
>>
>> Ed Merks wrote:
>>
>>> Ralf,
>>
>>
>>> Yes, to specialize the serialization and deserialization of instances
>>> you either need to mark up the model to direct the code in
>>> org.eclipse.emf.ecore.xmi to behave differently or you need to
>>> specialize the code to behave differently, in general.
>>
>>
>>> The generated XMI.xsd and all the generated .xsd files for that
>>> matter, are not used for anything. They are generated for you to
>>> use directly for whatever purpose requires a schema that
>>> *approximates *the grammar for instances.
>>
>>
>>
>>> Ralf Schlesener wrote:
>>
>>
>>>> Ed,
>>>>
>>>> does that mean I need to add the EAnnotations to a specific Ecore
>>>> model?
>>>> I would like to change the general mapping for any model.
>>>>
>>>> What is the XMI.xsd file, that is generated in the workspace by
>>>> Eclipse used for?
>>>>
>>>>
>>>> Ed Merks wrote:
>>>>
>>>>> Ralf,
>>>>
>>>>
>>>>
>>>>> I assume you found this document:
>>>>
>>>>
>>>>
>>>>>
>>>>
>>>>
>>>>
>>
http://dev.eclipse.org/viewcvs/indextools.cgi/%7Echeckout%7E /emf-home/docs/overviews/XMLSchemaToEcoreMapping.pdf
>>
>>
>>>>
>>>>
>>>>> The same EAnnotations that are used when mapping XSD to Ecore
>>>>> (which is done by org.eclipse.xsd.ecore.XSDEcoreBuilder in the
>>>>> org.eclipse.xsd plugins) can be used to mark up any Ecore model to
>>>>> direct how its instances will be serialized as XML (by the
>>>>> reflective serialization/deserialization code in
>>>>> org.eclipse.emf.ecore.xmi).
>>>>
>>>>
>>>>
>>>>
>>>>> Ralf Schlesener wrote:
>>>>
>>>>
>>>>
>>>>>> Hy, just a short question I can't find in the docs.
>>>>>>
>>>>>> Where is the mapping between Ecore models and XML schema done?
>>>>>>
>>>>>> How could I map attributes in Ecore on XML Elements in place of
>>>>>> XML Attributes?
>>>>>
>>>>>
>>>>
>>>>
>>
>>
Previous Topic:Ecore XML schema mapping
Next Topic:HTML 4.01 DTD validation problem
Goto Forum:
  


Current Time: Wed Jul 17 17:17:06 GMT 2024

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

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

Back to the top