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

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

Mon Nov 07, 2016 8:43 am

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: 2326

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

Tue Nov 08, 2016 1:02 pm

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

Return to “XML Schemas”

Who is online

Users browsing this forum: No registered users and 0 guests