global element --> local element

M

mavis

I am using eclipse xsd packages to access xsd.

What I am trying to do is: I have an element e1 (within a particle
"p1") that refers to a global element e2, and then I want to make a
copy of the global element e2 and add the copy to be a local element of
"p1".

The problem is I can clone this global element e2, but i cannot add it
into particle "p1". How can I replace the element e1 with the copy of
e2?

I did sth like this:

XSDElementDeclaration clonedXSDElem = (XSDElementDeclaration)
currentElem.cloneConcreteComponent(true, false);

currentElem.getXSDParticleContainer().setContent(clonedXSDElem);

Thanks a lot for your instructions!!

-Mavis....
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,982
Messages
2,570,185
Members
46,736
Latest member
AdolphBig6

Latest Threads

Top