Page 1 of 1

How to copy a complex type and paste in another XSD file?

Posted: Mon Nov 07, 2016 8:43 am
by dsato
Hello,

I have a XSD file that contains many nested complex types and am trying to copy the root element of a complex type and paste into another XSD file.

Code: Select all

Root Element(complex type)
|- Nested element A(complex type) --copy root--> Root Element(no complex type associated)
|- Nested element B(complex type)
|- etc
The problem I am facing is even when copying the root element, the nested elements and the associated complex types underneath are not copied for some reason.

Is there any way to copy the entire element i.e. element + complex type associated with it ?

Re: How to copy a complex type and paste in another XSD file?

Posted: Tue Nov 08, 2016 1:02 pm
by adrian
Hello,
The problem I am facing is even when copying the root element, the nested elements and the associated complex types underneath are not copied for some reason.
When you copy an element or type, you are copying only its own declaration and any local declarations it has. If there are references to global types and elements, these do not get copied.
Is there any way to copy the entire element i.e. element + complex type associated with it ?
I'm afraid there is no automatic way to copy the entire hierarchy as of v18.1 of Oxygen. You need to select (Ctrl+Click) the individual types/elements and copy the selection.

I've logged a feature request on our issue tracking tool for a "Copy hierarchy" action.

Regards,
Adrian