Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community Forumscopy xsd type definition from one schema to another
https://www.eclipse.org/forums/index.php/mv/msg/190300/603660/#msg_603660
I'm trying to copy a XSDTypeDefinition from one schema to another with
following code:
// 2. copy DOM element
Element dstElement = (Element)
dstSchema.getDocument().importNode(newType.getElement(), true);
dstType.setElement(dstElement);
// 3. put copied element to new schema
srcSchema.getContents().add(dstType);
But this way I seem to loose sync between schema model and DOM model of
copied XSDTypeDefinition.
When I do only 1., then some DOM elements are missing.