Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » XML Schema Definition (XSD) » traversing hierarchy of particles
traversing hierarchy of particles [message #41379] Wed, 14 April 2004 13:04 Go to next message
Eclipse UserFriend
Originally posted by: hoe.zurich.ibm.com

Is there a way to obtain the "transitive closure" around XSDParticles
that extend/restrict each other? What I have in mind is asking e.g. a
group particle for all its sub-particles (local and "inherited" ones)
all at once.

Thanks,
Christian
Re: traversing hierarchy of particles [message #41410 is a reply to message #41379] Wed, 14 April 2004 15:09 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Christian,

Particles don't extend or restrict each other, so I'm a little confused.
XSDModelGroup.getParticles() will give you all the "sub-particles"
regardless of where they come from. Are you looking for something in
addition to this?


Christian Hoertnagl wrote:

> Is there a way to obtain the "transitive closure" around XSDParticles
> that extend/restrict each other? What I have in mind is asking e.g. a
> group particle for all its sub-particles (local and "inherited" ones)
> all at once.
>
> Thanks,
> Christian
Re: traversing hierarchy of particles [message #41439 is a reply to message #41410] Wed, 14 April 2004 16:05 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: hoe.zurich.ibm.com

Ed Merks wrote:

> Particles don't extend or restrict each other, so I'm a little confused.

Sorry for being unclear. I was refering to (complex) types that
extend/restrict each other, and that use those particles indirectly.

> XSDModelGroup.getParticles() will give you all the "sub-particles"
> regardless of where they come from. Are you looking for something in
> addition to this?

Thx, this may already be enough. What I have in mind is a situation
where a complex type references an XSDModelGroup (via XSDParticle with
XSDContentTypeCategory.ELEMENT_ONLY_LITERAL, say). If the base type also
has its XSDModelGroup, the two XSDCompositor's may be different, as far
as the XSD data structures are concerned: one CHOICE_LITERAL, the other
ALL_LITERAL, I guess. Is this sort of thing detected/resolved, when I
call XSDModelGroup.getParticles() to get a "flat" list including
"sub-particles", or do I have to do sg. special myself (XML Schema Part
1, section 3.9.6 says more on cases that may occur).

Hope it's a bit clearer now & I'll do some more tests locally,
Christian
Re: traversing hierarchy of particles [message #41468 is a reply to message #41439] Wed, 14 April 2004 16:42 Go to previous message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Christian,

The particle structure resolves all the references so that you can walk the
"virtual" particle tree exactly as it is defined in the schema spec. Just make
sure you call the methods that say they represent an "infoset property" rather
than the ones that are "concrete", i.e., XSDModelGroup.getParticles() verses
XSDModelGroup.getContents().


Christian Hoertnagl wrote:

> Ed Merks wrote:
>
> > Particles don't extend or restrict each other, so I'm a little confused.
>
> Sorry for being unclear. I was refering to (complex) types that
> extend/restrict each other, and that use those particles indirectly.
>
> > XSDModelGroup.getParticles() will give you all the "sub-particles"
> > regardless of where they come from. Are you looking for something in
> > addition to this?
>
> Thx, this may already be enough. What I have in mind is a situation
> where a complex type references an XSDModelGroup (via XSDParticle with
> XSDContentTypeCategory.ELEMENT_ONLY_LITERAL, say). If the base type also
> has its XSDModelGroup, the two XSDCompositor's may be different, as far
> as the XSD data structures are concerned: one CHOICE_LITERAL, the other
> ALL_LITERAL, I guess. Is this sort of thing detected/resolved, when I
> call XSDModelGroup.getParticles() to get a "flat" list including
> "sub-particles", or do I have to do sg. special myself (XML Schema Part
> 1, section 3.9.6 says more on cases that may occur).
>
> Hope it's a bit clearer now & I'll do some more tests locally,
> Christian
Re: traversing hierarchy of particles [message #585586 is a reply to message #41379] Wed, 14 April 2004 15:09 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 31540
Registered: July 2009
Senior Member
Christian,

Particles don't extend or restrict each other, so I'm a little confused.
XSDModelGroup.getParticles() will give you all the "sub-particles"
regardless of where they come from. Are you looking for something in
addition to this?


Christian Hoertnagl wrote:

> Is there a way to obtain the "transitive closure" around XSDParticles
> that extend/restrict each other? What I have in mind is asking e.g. a
> group particle for all its sub-particles (local and "inherited" ones)
> all at once.
>
> Thanks,
> Christian


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: traversing hierarchy of particles [message #585608 is a reply to message #41410] Wed, 14 April 2004 16:05 Go to previous message
Eclipse UserFriend
Originally posted by: hoe.zurich.ibm.com

Ed Merks wrote:

> Particles don't extend or restrict each other, so I'm a little confused.

Sorry for being unclear. I was refering to (complex) types that
extend/restrict each other, and that use those particles indirectly.

> XSDModelGroup.getParticles() will give you all the "sub-particles"
> regardless of where they come from. Are you looking for something in
> addition to this?

Thx, this may already be enough. What I have in mind is a situation
where a complex type references an XSDModelGroup (via XSDParticle with
XSDContentTypeCategory.ELEMENT_ONLY_LITERAL, say). If the base type also
has its XSDModelGroup, the two XSDCompositor's may be different, as far
as the XSD data structures are concerned: one CHOICE_LITERAL, the other
ALL_LITERAL, I guess. Is this sort of thing detected/resolved, when I
call XSDModelGroup.getParticles() to get a "flat" list including
"sub-particles", or do I have to do sg. special myself (XML Schema Part
1, section 3.9.6 says more on cases that may occur).

Hope it's a bit clearer now & I'll do some more tests locally,
Christian
Re: traversing hierarchy of particles [message #585627 is a reply to message #41439] Wed, 14 April 2004 16:42 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 31540
Registered: July 2009
Senior Member
Christian,

The particle structure resolves all the references so that you can walk the
"virtual" particle tree exactly as it is defined in the schema spec. Just make
sure you call the methods that say they represent an "infoset property" rather
than the ones that are "concrete", i.e., XSDModelGroup.getParticles() verses
XSDModelGroup.getContents().


Christian Hoertnagl wrote:

> Ed Merks wrote:
>
> > Particles don't extend or restrict each other, so I'm a little confused.
>
> Sorry for being unclear. I was refering to (complex) types that
> extend/restrict each other, and that use those particles indirectly.
>
> > XSDModelGroup.getParticles() will give you all the "sub-particles"
> > regardless of where they come from. Are you looking for something in
> > addition to this?
>
> Thx, this may already be enough. What I have in mind is a situation
> where a complex type references an XSDModelGroup (via XSDParticle with
> XSDContentTypeCategory.ELEMENT_ONLY_LITERAL, say). If the base type also
> has its XSDModelGroup, the two XSDCompositor's may be different, as far
> as the XSD data structures are concerned: one CHOICE_LITERAL, the other
> ALL_LITERAL, I guess. Is this sort of thing detected/resolved, when I
> call XSDModelGroup.getParticles() to get a "flat" list including
> "sub-particles", or do I have to do sg. special myself (XML Schema Part
> 1, section 3.9.6 says more on cases that may occur).
>
> Hope it's a bit clearer now & I'll do some more tests locally,
> Christian


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:traversing hierarchy of particles
Next Topic:Problem with transferring a type definition between two schemas
Goto Forum:
  


Current Time: Wed Oct 21 14:17:31 GMT 2020

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

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

Back to the top