Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » MDT (Model Development Tools) » [BPMN2] Missing namespace export for XSD-based serialization
[BPMN2] Missing namespace export for XSD-based serialization [message #551700] Mon, 09 August 2010 08:54 Go to next message
Joern is currently offline Joern
Messages: 22
Registered: March 2010
Junior Member
Using the BPMN2 project to play around a bit I got stuck deserializing BPMN2 models in XSD style (cf. http://www.eclipse.org/forums/index.php?t=msg&th=173115& amp;start=0&S=b232df95af50d48184cbb94714d2827f). I fixed this adding the following entry to the org.eclipse.bpmn2 plugin.xml:

   <extension point="org.eclipse.emf.ecore.generated_package">
      <package
            class="org.eclipse.bpmn2.Bpmn2Package"
            genModel="model/BPMN20.genmodel"
            uri="http://www.omg.org/spec/BPMN/20100524/MODEL"/>
   </extension>


Do I miss something or is this a bug?

Cheers,

Joern
Re: [BPMN2] Missing namespace export for XSD-based serialization [message #551706 is a reply to message #551700] Mon, 09 August 2010 09:45 Go to previous messageGo to next message
Henning Heitkoetter is currently offline Henning Heitkoetter
Messages: 21
Registered: April 2010
Junior Member
Hello Joern,

thanks for using the BPMN 2 project and pointing this out.

This is to some extent a known problem, but I had hoped that it was solved:
We now register the XML namespace separately in code. It could be, however, that Xtext relies directly on the information in plugin.xml.
I'll try to test this myself - if you could supply a small sample that would be useful.

Which "version" of our project do you use? The latest from our git repository?

Thanks,
Henning
Re: [BPMN2] Missing namespace export for XSD-based serialization [message #551727 is a reply to message #551700] Mon, 09 August 2010 11:12 Go to previous messageGo to next message
Joern is currently offline Joern
Messages: 22
Registered: March 2010
Junior Member
Hello Henning,

Quote:
Which "version" of our project do you use? The latest from our git repository?

yes - got it from http://git.eclipse.org/c/bpmn2/.
Quote:
I'll try to test this myself - if you could supply a small sample that would be useful.

I wrote a small workaround to reference bpmn2 models in xText models. If you drop me a note with your email I can send you the source for the workaround and the corresponding ecore/xText projects.

Essential a sample grammar looks like (assuming a corresponding ecore model)
grammar foo.bar.mydsl.MyDsl with org.eclipse.xtext.common.Terminals 

import "platform:/resource/foo.bar.ecore/model/My.ecore" 
import "http://www.eclipse.org/emf/2002/Ecore" as ecore

Model:
	elements+=Element*;
	
Element : 
	Modelimport | Greeting 
;

Modelimport :
	'Import' 
	importURI=STRING
;
	
Greeting:
	'Hello' name=ID '!' 
	('Reference' reference=[ecore::EObject])?;

A sample xText model will look like (assuming a bpmn2 model called "My.bpmn2" in the same directory containing an element with the name "MyProcess"):
Import "My.bpmn2"
Hello Henning !
Reference MyProcess

Cheers,
Joern

[Updated on: Mon, 09 August 2010 11:13]

Report message to a moderator

Re: [BPMN2] Missing namespace export for XSD-based serialization [message #551732 is a reply to message #551727] Mon, 09 August 2010 11:43 Go to previous messageGo to next message
Henning Heitkoetter is currently offline Henning Heitkoetter
Messages: 21
Registered: April 2010
Junior Member
Joern wrote on Mon, 09 August 2010 07:12
If you drop me a note with your email I can send you the source for the workaround and the corresponding ecore/xText projects.

Thanks, that would be helpful: [e-mail address removed]

Regards,
Henning

[Updated on: Mon, 09 August 2010 14:11]

Report message to a moderator

Re: [BPMN2] Missing namespace export for XSD-based serialization [message #551934 is a reply to message #551700] Tue, 10 August 2010 08:45 Go to previous message
Henning Heitkoetter is currently offline Henning Heitkoetter
Messages: 21
Registered: April 2010
Junior Member
This is now fixed in our repository (see bug 320079).

Thank you again for bringing this problem to our attention.
Previous Topic:MDT Installation with sources
Next Topic:[BPMN2] Missing namespace export for XSD-based serialization
Goto Forum:
  


Current Time: Sun Sep 21 22:14:26 GMT 2014

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

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