Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » XML Schema Definition (XSD) » Copy Schema item
Copy Schema item [message #597105] Fri, 04 November 2005 15:58
David Carver is currently offline David Carver
Messages: 174
Registered: July 2009
Senior Member
I'm running into an issue with the XSD API from eclipse. I'm trying to
copy an XSD artifact from one XSDSchema to another.

Basically, I want to take elements, complexTypes, and simpleTypes and copy
them exactly into another schema. If I go through programmicly and
create each type, they appear when I serialize them. However if I do
something like the following:

XSDElementDeclaration element =
XSDFactory.eINSTANCE.createXSDElementDeclaration();
element.setElement(xsdItem.getElement());
newMergedSchema.getContents().add(element);

They appear in the newMergedSchemas.getContents() when I examine it with
the debugger, but when I serialize the newMergeSchema, the items do not
show up in the serialization. I've tried doing an
element.updateElement(), but that didn't have any affect. I've also
tried a clone, but it doesn't do anything different.

Any ideas?

Dave
Previous Topic:Re: Problem when extracting XSD from WSDL
Next Topic:Copy Schema item
Goto Forum:
  


Current Time: Thu Jul 31 16:00:41 EDT 2014

Powered by FUDForum. Page generated in 0.01599 seconds