Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » XML Schema Definition (XSD) » Adding XSD components to an existing schema
Adding XSD components to an existing schema [message #591232] Wed, 01 September 2004 21:27
Gary J is currently offline Gary JFriend
Messages: 61
Registered: July 2009
Member
Hi,

I want to add a Simple Element declaration to a ModelGroup (sequence). What
I have is the XSDModelGroup object (modelGroup) and the name of the element.
Do I have enough information to add this element or do I need to start with
the Particle of the ModelGroup?

For instance:

void addElementToGroup(XSDModelGroup modelGroup, String elementName)
{
// user defined function
XSDParticle particle = newXSDElement(elementName, 0, 1);

// add new Element to model group
modelGroup.getContents().add(particle);
}

Is this enough to update my XSD model or is there something else I need to
do?

Also, in my tree model I'm only storing XSDModelGroup and
XSDElementDeclaration objects. Should I perhaps store the Particles of each
instead or is there a way to determine the "parent" particle from these?

In this example I'm updating the concrete schema. I assume the abstract
representation will work as well after this update. Is that correct?


I hope I'm not being too cryptic.

thanks

Gary
Previous Topic:Re: EMF/SDO/XSD Update Manager Site
Next Topic:order of attributes when writing a schema
Goto Forum:
  


Current Time: Thu Apr 25 15:32:59 GMT 2024

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

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

Back to the top