Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » From ecore - to xsd
From ecore - to xsd [message #38065] Mon, 04 September 2006 06:57 Go to next message
Eclipse UserFriend
Originally posted by: peter.kovgan.gmail.com

Is there approach(tool) to transfer ecore model to XSD schema?

Thanks!
Re: From ecore - to xsd [message #38301 is a reply to message #38065] Mon, 04 September 2006 08:41 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Peter,

Given a .genmodel for your Ecore model, you can invoke "Export Model..."
from its popup (or from the Generator menubar item when the .genmodel is
open in the Generator) to generate a corresponding XML Schema.


Peter Kovgan wrote:
> Is there approach(tool) to transfer ecore model to XSD schema?
>
> Thanks!
>
Re: From ecore - to xsd [message #38465 is a reply to message #38301] Mon, 04 September 2006 10:10 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: peter.kovgan.gmail.com

Ed,
thanks, I found it already.
But could I ask other question:

My model instance(output xml instance, created as result of diagram
building)is created, but how can I use this XML in my application if, for
example, I want to parse this XML?

Example:
I failed to parse it(at least in separated standalone app), because if I
try to attach mymodel.XSD to this xml instance and ecore.XSD to
mymodel.XSD then I receive error:
"org.xml.sax.SAXParseException: Content is not allowed in prolog."

This is references line:
ecore.XSD<-mymodel.XSD<-myInstance.xml



XML Spy signalizes about some very strange error in ecore.XSD.
(I took ecore.XSD from jar and put it in some local folder).

What is wrong?
Probably I can't use this result XML instance out of plugin?
How to use it(parse it) in plugin or out of plugin?




Thanks!!
Re: From ecore - to xsd [message #38682 is a reply to message #38465] Mon, 04 September 2006 11:32 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.
--------------090201050001090707060601
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

Peter,

Use the popup menu in the Generator to generate the Test code and then
look at the XyzExample.java in the generated *.tests plugin. That
illustrates how to load and save instances in a standalone application.
If you move schemas around, you'll need to look at the schemaLocation
in each import to be sure it's correct relative to where you've put the
documents. You might find this article useful:

Binding XML to Java
< http://www.theserverside.com/tt/articles/article.tss?l=Bindi ngXMLJava>


Peter Kovgan wrote:
> Ed,
> thanks, I found it already.
> But could I ask other question:
>
> My model instance(output xml instance, created as result of diagram
> building)is created, but how can I use this XML in my application if,
> for example, I want to parse this XML?
>
> Example:
> I failed to parse it(at least in separated standalone app), because if
> I try to attach mymodel.XSD to this xml instance and ecore.XSD to
> mymodel.XSD then I receive error:
> "org.xml.sax.SAXParseException: Content is not allowed in prolog."
>
> This is references line:
> ecore.XSD<-mymodel.XSD<-myInstance.xml
>
>
> XML Spy signalizes about some very strange error in ecore.XSD.
> (I took ecore.XSD from jar and put it in some local folder).
>
> What is wrong?
> Probably I can't use this result XML instance out of plugin?
> How to use it(parse it) in plugin or out of plugin?
>
>
>
>
> Thanks!!
>
>
>


--------------090201050001090707060601
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">
Peter,<br>
<br>
Use the popup menu in the Generator to generate the Test code and then
look at the XyzExample.java in the generated *.tests plugin.
Re: From ecore - to xsd [message #38944 is a reply to message #38682] Tue, 05 September 2006 02:33 Go to previous message
Eclipse UserFriend
Originally posted by: peter.kovgan.gmail.com

Ed hi!

Thanks from the bottom of my heart!

Now I can advance.

Cheers!
Previous Topic:OCL Console in GMF
Next Topic:Alternative template technology in GMF
Goto Forum:
  


Current Time: Wed Jul 23 12:20:51 EDT 2025

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

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

Back to the top