Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » XML Schema Definition (XSD) » Getting elements II
Getting elements II [message #585693] Fri, 16 April 2004 20:33
Eclipse UserFriend
Originally posted by: adrian_andrei.sockeyesolutions.com

I would like to ask a follow-up question concerning the "attached" posting:
If I traverse xsd to construct the element list, I have to solve all schema
choice and derivation by myself, right ? The getContentType will just
expose
the above particles, isn't it!?

Subject: Re: Getting elements
From: merks@ca.ibm.com (Ed Merks)
Newsgroups: eclipse.technology.xsd
Organization: EclipseCorner
Date: Mar 02 2004 07:15:58
References: 1

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?
>
Previous Topic:Problem with transferring a type definition between two schemas
Next Topic:Getting elements II
Goto Forum:
  


Current Time: Thu Apr 25 19:58:49 GMT 2024

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

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

Back to the top