Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » GMT (Generative Modeling Technologies) » applying mofscript to XML model
applying mofscript to XML model [message #378876] Fri, 17 August 2007 14:17
Eclipse UserFriend
Originally posted by: pehl1.stonehouse.oilfield.slb.com

This is a multi-part message in MIME format.

------=_NextPart_000_0023_01C7E0E1.C2C23780
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Heia,=20

I send this to 'EclipseZone' the other day but wasn't really successful =
yet in solving it. Can somebody help ?

I have written a simple xsd schema file representing a network structure =
.. Out of this I created a model editor using EMF and XSD. The model =
editor works fine. All XML files created with this editor can be saved =
to a file and read back without problems.=20

I created a mofscript using the mofscript editor. The code completion =
feature of the mofscript editor perfectly finds all model elements and =
types of the XSD schema. The mofscript compiles without errors. Now =
running the script on any of the models created with the model editor =
does not work at all. It complains about a 'null' reference which it =
does not find.=20

Any ideas ?=20

Hermann=20



The XML file I am applying my mofscript to is:=20

<?xml version=3D"1.0" encoding=3D"UTF-8"?>=20
<Network>=20
<Node>=20
<TxMessage/>=20
<TxMessage/>=20
<Name></Name>=20
</Node>=20
<Node>=20
<Name></Name>=20
<TxMessage/>=20
<RxMessage/>=20
</Node>=20
</Network>



the error message from the mofscript execution is :=20

## Open File: D:\work\runtime-EclipseApplication(1)\test\My.dnitest for =
input model:mdl=20
## Loading source model - My.dnitest... #Error in source model loading: =
org.eclipse.emf.ecore.xmi.PackageNotFoundException: Package with uri =
'null' not found. =
(file:/D:/work/runtime-EclipseApplication(1)/test/My.dnitest , 2, =
121)(Loading time 16 - Msec)=20
## Executing MOFScript Specification=20

Execution Error: =
org.sintef.mofscript.runtime.MofScriptExecutionException: No Source =
Models defined.



In the plugin.xml file for the model it says (whereas 'dnitest' is the =
file extension for the models):=20

<?xml version=3D"1.0" encoding=3D"UTF-8"?>
<?eclipse version=3D"3.0"?>
<!--

<copyright>
</copyright>
$Id$
-->
<plugin>
<extension point=3D"org.eclipse.emf.ecore.generated_package">
<package
uri =3D =
"file:/D:/work/OmniRev/FullArcher1/CANalyzer/DNItest.xsd"=20
class =3D "DNItest.DNItestPackage"
genModel =3D "model/DNItest.genmodel" />=20
</extension>
<extension point=3D"org.eclipse.emf.ecore.extension_parser">
<parser=20
type=3D"dnitest"=20
class=3D"DNItest.util.DNItestResourceFactoryImpl" />
</extension>
</plugin>

------=_NextPart_000_0023_01C7E0E1.C2C23780
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2900.3132" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV>Heia, <BR><BR>I send this to 'EclipseZone' the other day but wasn't =
really=20
successful yet in solving it. Can somebody help ?</DIV>
<DIV>&nbsp;</DIV>
<DIV>I have written a simple xsd schema file representing a network =
structure .=20
Out of this I created a model editor using EMF and XSD. The model editor =
works=20
fine. All XML files created with this editor can be saved to a file and =
read=20
back without problems. <BR><BR>I created a mofscript using the mofscript =
editor.=20
The code completion feature of the mofscript editor perfectly =
finds&nbsp;all=20
model elements and types of the XSD schema. The mofscript compiles =
without=20
errors. Now running the script on any of the models created with the =
model=20
editor does not work at all. It complains about a 'null' reference which =
it does=20
not find. <BR><BR>Any ideas ? <BR><BR>Hermann <BR><BR><BR><BR>The XML =
file I am=20
applying my mofscript to is: <BR><BR>&lt;?xml version=3D"1.0"=20
encoding=3D"UTF-8"?&gt; <BR>&nbsp;&nbsp;&nbsp; &lt;Network&gt;=20
<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;Node&gt; =
<BR>&nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;TxMessage/&gt; =
<BR>&nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;TxMessage/&gt; =
<BR>&nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;Name&gt;&lt;/Name&gt;=20
<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/Node&gt; =
<BR>&nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; &lt;Node&gt; <BR>&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; &lt;Name&gt;&lt;/Name&gt; <BR>&nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;TxMessage/&gt; =
<BR>&nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;RxMessage/&gt; =
<BR>&nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; &lt;/Node&gt; <BR>&nbsp;&nbsp;&nbsp;=20
&lt;/Network&gt;<BR><BR></DIV>
<DIV><FONT face=3DArial size=3D2></FONT><BR>the error message from the =
mofscript=20
execution is : <BR><BR>## Open File:=20
D:\work\runtime-EclipseApplication(1)\test\My.dnitest for input =
model:mdl <BR>##=20
Loading source model - My.dnitest... #Error in source model loading:=20
org.eclipse.emf.ecore.xmi.PackageNotFoundException: Package with uri =
'null' not=20
found. (file:/D:/work/runtime-EclipseApplication(1)/test/My.dnitest , 2,=20
121)(Loading time 16 - Msec) <BR>## Executing MOFScript Specification=20
<BR><BR>Execution Error:=20
org.sintef.mofscript.runtime.MofScriptExecutionException: No Source =
Models=20
defined.</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV>In the plugin.xml file for the model it says (whereas 'dnitest' is =
the file=20
extension for the models): <BR><BR><FONT size=3D2>&lt;?xml =
version=3D"1.0"=20
encoding=3D"UTF-8"?&gt;<BR>&lt;?eclipse=20
version=3D"3.0"?&gt;<BR>&lt;!--<BR><BR>&lt;copyright&gt; <BR>&lt;/copyrigh=
t&gt;<BR>$Id$<BR>--&gt;<BR>&lt;plugin&gt; <BR>&nbsp;&nbsp;&nbsp;=20
&lt;extension=20
point=3D"org.eclipse.emf.ecore.generated_package"&gt;<BR >&nbsp;&nbsp;&nbs=
p;=20
&lt;package<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; =
uri =3D=20
"file:/D:/work/OmniRev/FullArcher1/CANalyzer/DNItest.xsd" =
<BR>&nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; class =3D=20
"DNItest.DNItestPackage"<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; genModel =3D "model/DNItest.genmodel" /&gt;=20
<BR>&nbsp;&nbsp;&nbsp; &lt;/extension&gt;<BR>&nbsp;&nbsp;&nbsp; =
&lt;extension=20
point=3D"org.eclipse.emf.ecore.extension_parser"&gt;<BR >&nbsp;&nbsp;&nbsp=
;=20
&lt;parser <BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;=20
type=3D"dnitest" <BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;=20
class=3D"DNItest.util.DNItestResourceFactoryImpl"=20
/&gt;<BR> &nbsp;&nbsp;&nbsp;&nbsp;&lt;/extension&a mp;gt; <BR></FONT><FONT=20
size=3D2>&lt;/plugin&gt;</FONT><BR><FONT face=3DArial=20
size=3D2></FONT></DIV></BODY></HTML>

------=_NextPart_000_0023_01C7E0E1.C2C23780--
Previous Topic:applying mofscript to XML model
Next Topic:[xText]left-recursive
Goto Forum:
  


Current Time: Sat Apr 27 00:48:21 GMT 2024

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

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

Back to the top