Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » XML Schema Definition (XSD) » Getting elements
Getting elements [message #37657] Mon, 01 March 2004 22:32 Go to next message
Eclipse UserFriend
Originally posted by: norton.softouch.com

I must be looking at something completely wrong because this can't be that
tough. I'm attempting to populate a tree viewer with the elements
declared in a schema. I can use the getElementDeclarations method to
retrieve global element(s), but how do I retrieve the elements from, say,
a complex type global element? I've chased through particles and models,
but can find no method equivalent to getElementDeclarations (or even
getElementDeclaration) for these components. Can anyone set me on the
right path?
Re: Getting elements [message #37724 is a reply to message #37657] Tue, 02 March 2004 12:15 Go to previous message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Michael,

A complex type t only has a t.getContentType() which is a particle if
t.getContentTypeCategory() is element-only or mixed. A particle has a term
which may be an element, a wildcard or a model group, where a model group has
more particles recursively. The root particle of a complex type will be a
sequence model group. There is no flat list of element declarations in the
complex type, there's only it's content model represented as a tree of
particles.


Michael Norton wrote:

> I must be looking at something completely wrong because this can't be that
> tough. I'm attempting to populate a tree viewer with the elements
> declared in a schema. I can use the getElementDeclarations method to
> retrieve global element(s), but how do I retrieve the elements from, say,
> a complex type global element? I've chased through particles and models,
> but can find no method equivalent to getElementDeclarations (or even
> getElementDeclaration) for these components. Can anyone set me on the
> right path?
>
Re: Getting elements [message #583657 is a reply to message #37657] Tue, 02 March 2004 12:15 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Michael,

A complex type t only has a t.getContentType() which is a particle if
t.getContentTypeCategory() is element-only or mixed. A particle has a term
which may be an element, a wildcard or a model group, where a model group has
more particles recursively. The root particle of a complex type will be a
sequence model group. There is no flat list of element declarations in the
complex type, there's only it's content model represented as a tree of
particles.


Michael Norton wrote:

> I must be looking at something completely wrong because this can't be that
> tough. I'm attempting to populate a tree viewer with the elements
> declared in a schema. I can use the getElementDeclarations method to
> retrieve global element(s), but how do I retrieve the elements from, say,
> a complex type global element? I've chased through particles and models,
> but can find no method equivalent to getElementDeclarations (or even
> getElementDeclaration) for these components. Can anyone set me on the
> right path?
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Getting elements
Next Topic:Moving components from one XSD schema to another Ctd
Goto Forum:
  


Current Time: Wed Apr 24 23:10:50 GMT 2024

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

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

Back to the top