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

This should cover W3C XML Schema, Relax NG and DTD related problems.
dsato
Posts: 1
Joined: Mon Nov 07, 2016 8:26 am

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

Post 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 ?
adrian
Posts: 2879
Joined: Tue May 17, 2005 4:01 pm

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

Post 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
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Post Reply