Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » XML Schema Definition (XSD) » Cloning annotations
Cloning annotations [message #77637] Fri, 08 May 2009 05:50 Go to next message
Keshavrao  is currently offline Keshavrao Friend
Messages: 34
Registered: July 2009
Member
Hello Ed,

We want to clone components from one schema to another and we found two
ways of doing it -
1)cloneConcreteComponent in XSDConcreteComponent
2)import the DOM node as bhuvan, shobana are doing the previous thread.

The first option doesnt have any problems, it clones the component well
and also it works with the DOM prefixes nicely because it builds the DOM
completely for itself, but it doesnt copy the annotations.

But we also want to copy the annotations and i have to go by the second
option which has all the weird problems with the prefixes when XSDs come
from different sources.

Can we have the cloneConcreteComponent method to also copy the annotations
reliably instead to go with the second option.

Or it would also be gr8 if you can suggest us some other way of cloning
the annotations.

Thanks and regards,
Keshav Veerapaneni.
Re: Cloning annotations [message #77653 is a reply to message #77637] Fri, 08 May 2009 14:03 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Keshav,

Comments below.

Keshavrao wrote:
> Hello Ed,
>
> We want to clone components from one schema to another and we found
> two ways of doing it - 1)cloneConcreteComponent in XSDConcreteComponent
> 2)import the DOM node as bhuvan, shobana are doing the previous thread.
>
> The first option doesnt have any problems, it clones the component
> well and also it works with the DOM prefixes nicely because it builds
> the DOM completely for itself, but it doesnt copy the annotations.
Yes.
>
> But we also want to copy the annotations and i have to go by the
> second option which has all the weird problems with the prefixes when
> XSDs come from different sources.
You'd think DOM would have better ways to handle something like this.
Seems like a fairly straight forward thing one would like to do, but in
the end it's not. Which is of course made worse because the annotation
might contain things that are QNames but aren't known to be QNames...
>
> Can we have the cloneConcreteComponent method to also copy the
> annotations reliably instead to go with the second option.
No, because the cloning is done purely at the model level and hence
doesn't involve DOM. Annotations are not represented in any way other
than as DOM.
>
> Or it would also be gr8 if you can suggest us some other way of
> cloning the annotations.
I think I'm out of suggestions. It's a tricky problem and I just don't
have spare cycles to solve it for free. Contributions from the
community toward additional utilities or facilities will be welcome.
>
> Thanks and regards,
> Keshav Veerapaneni.
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Cloning annotations [message #604178 is a reply to message #77637] Fri, 08 May 2009 14:03 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Keshav,

Comments below.

Keshavrao wrote:
> Hello Ed,
>
> We want to clone components from one schema to another and we found
> two ways of doing it - 1)cloneConcreteComponent in XSDConcreteComponent
> 2)import the DOM node as bhuvan, shobana are doing the previous thread.
>
> The first option doesnt have any problems, it clones the component
> well and also it works with the DOM prefixes nicely because it builds
> the DOM completely for itself, but it doesnt copy the annotations.
Yes.
>
> But we also want to copy the annotations and i have to go by the
> second option which has all the weird problems with the prefixes when
> XSDs come from different sources.
You'd think DOM would have better ways to handle something like this.
Seems like a fairly straight forward thing one would like to do, but in
the end it's not. Which is of course made worse because the annotation
might contain things that are QNames but aren't known to be QNames...
>
> Can we have the cloneConcreteComponent method to also copy the
> annotations reliably instead to go with the second option.
No, because the cloning is done purely at the model level and hence
doesn't involve DOM. Annotations are not represented in any way other
than as DOM.
>
> Or it would also be gr8 if you can suggest us some other way of
> cloning the annotations.
I think I'm out of suggestions. It's a tricky problem and I just don't
have spare cycles to solve it for free. Contributions from the
community toward additional utilities or facilities will be welcome.
>
> Thanks and regards,
> Keshav Veerapaneni.
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Cloning annotations [message #1736542 is a reply to message #604178] Thu, 30 June 2016 09:31 Go to previous message
Dilip Baviskar is currently offline Dilip BaviskarFriend
Messages: 2
Registered: June 2016
Junior Member
Keshav,
Is your issue for deep cloning of annotation resolved ?
Previous Topic:Generate XML instance from XML schema [programmatically]
Next Topic:news.eclipse.org is shutting down.
Goto Forum:
  


Current Time: Thu Apr 25 12:54:28 GMT 2024

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

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

Back to the top