Error using sequence [message #592732] |
Fri, 26 November 2004 09:48 |
Eclipse User |
|
|
|
Originally posted by: ooi.de.ibm.com
Hi!
I came across a funny error and have no idea why it happens.
when I run this code :
XSDComplexTypeDefinition complexType =
XSDFactory.eINSTANCE.createXSDComplexTypeDefinition();
complexType.setName("PurchaseOrderType");
XSDParticle particle = XSDFactory.eINSTANCE.createXSDParticle();
XSDModelGroup modelGroup = XSDFactory.eINSTANCE.createXSDModelGroup();
modelGroup.setCompositor(XSDCompositor.SEQUENCE_LITERAL);
particle.setContent(modelGroup);
complexType.setContent(particle);
schema.getContents().add(complexType); //error shown here
its shows the following error during runtime:
org.w3c.dom.DOMException: HIERARCHY_REQUEST_ERR: An attempt was made to
insert a node where it is not permitted.
but using only:
XSDComplexTypeDefinition complexType =
XSDFactory.eINSTANCE.createXSDComplexTypeDefinition();
complexType.setName("PurchaseOrderType");
schema.getContents().add(complexType);
there is no problem.
what could be the cause of this error?
Thanks.
|
|
|
Powered by
FUDForum. Page generated in 0.03133 seconds