Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » XML Schema Definition (XSD) » Error using sequence
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.
Previous Topic:Retrieving documentation from an <xsd:pattern> within a schema
Next Topic:Error using sequence
Goto Forum:
  


Current Time: Sat Oct 25 09:06:16 GMT 2014

Powered by FUDForum. Page generated in 0.01838 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software