Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Saving sub model...help!
Saving sub model...help! [message #415966] Mon, 14 January 2008 15:38 Go to next message
Eclipse UserFriend
Originally posted by: minhyuk.kut.ac.kr

hi all^^;

i have very a huge model scheme(.xsd).
i try to driven all element, but i can't it's so complicate...
so, i have determine, developing editors and each editor driven sub-model and save each xml files finally project manager merge all together(export-menu export one xml file).
(it means, not editing xsd file, but just using sub element)

i have faced problem, when i saving the sub model.
the saved xml file is different my xsd scheme.

for example, element name is broken. like this

originally: (i want to saving this n_n)
<tc:pou xmlns:tc="http://abc.org/tc6.xsd" name="test">
<tc:body>
<tc:LD/>
</tc:body>
</tc:pou>

but:
<tc:pou_._type xmlns:tc="http://abc.org/tc6.xsd" name="test">
<tc:body>
<tc:LD/>
</tc:body>
</tc:pou_._type>


---- what option i can use? in XMLResource.

PS. do you know hide tc prefix? that's another problem!!
i really want to like this:
<pou name="test">
<body>
<LD/>
<body>
<pou>
Re: Saving sub model...help! [message #415967 is a reply to message #415966] Mon, 14 January 2008 16:01 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33142
Registered: July 2009
Senior Member
MinHyuk,

Comments below.


MinHyuk wrote:
> hi all^^;
>
> i have very a huge model scheme(.xsd).
>
Poor you!
> i try to driven all element, but i can't it's so complicate...
>
"driven"?
> so, i have determine, developing editors and each editor driven sub-model and save each xml files finally project manager merge all together(export-menu export one xml file).
> (it means, not editing xsd file, but just using sub element)
>
So you're breaking things into multiple smaller files. I'm not sure you
need multiple different editors for that though...
> i have faced problem, when i saving the sub model.
> the saved xml file is different my xsd scheme.
>
> for example, element name is broken. like this
>
> originally: (i want to saving this n_n)
> <tc:pou xmlns:tc="http://abc.org/tc6.xsd" name="test">
> <tc:body>
> <tc:LD/>
> </tc:body>
> </tc:pou>
>
> but:
> <tc:pou_._type xmlns:tc="http://abc.org/tc6.xsd" name="test">
> <tc:body>
> <tc:LD/>
> </tc:body>
> </tc:pou_._type>
>
>
> ---- what option i can use? in XMLResource.
>
So it seems you are directly saving an instance of some anonymous type.
To serialize properly according to a global element you really need to
create an instance of the model's DocumentRoot and set your instance
into an appropriate feature corresponding to a global element
declaration. This is necessary to parse it properly later.
> PS. do you know hide tc prefix? that's another problem!!
> i really want to like this:
> <pou name="test">
> <body>
> <LD/>
> <body>
> <pou>
>
Again, you could use a document root for that. The document root has a
getXMLNSPrefixMap and you can do put ("", <namespace") to produce an
xmlns="..." declaration. It seems you me you do need to specify a
namespace not just leave it null...


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Saving sub model...help! [message #415985 is a reply to message #415967] Tue, 15 January 2008 05:15 Go to previous message
Eclipse UserFriend
Originally posted by: minhyuk.kut.ac.kr

Thanks, i always thank this community~ very kind!!!
Previous Topic:How to load an model instance from its xmi file?
Next Topic:How to assign the nodes with the link mapping in GMF
Goto Forum:
  


Current Time: Fri Apr 26 14:07:25 GMT 2024

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

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

Back to the top