Thanks Neil, I figured it out.

Stephen

On Fri, 18 Jul 2003, Neil Graham wrote:

> 
> Hi Stephen,
> 
> <element>s with names can only have minOccurs/maxOccurs attributes if
> they're local to a complexType.  This implies that the element is part of
> an XSParticle.  It's on the XSParticle that holds the reference to the
> XSElementDeclaration that you'll find the minOccurs/maxOccurs values, if
> I'm reading the API correctly.
> 
> Cheers,
> Neil
> Neil Graham
> XML Parser Development
> IBM Toronto Lab
> Phone:  905-413-3519, T/L 969-3519
> E-mail:  [EMAIL PROTECTED]
> 
> 
> 
> 
> |---------+---------------------------->
> |         |           Lingzhi Zhang    |
> |         |           <[EMAIL PROTECTED]|
> |         |           du>              |
> |         |                            |
> |         |           07/18/2003 12:22 |
> |         |           PM               |
> |         |           Please respond to|
> |         |           xerces-j-user    |
> |         |                            |
> |---------+---------------------------->
>   
> >---------------------------------------------------------------------------------------------------------------------------------------------|
>   |                                                                           
>                                                                   |
>   |       To:       [EMAIL PROTECTED]                                         
>                                                        |
>   |       cc:                                                                 
>                                                                   |
>   |       Subject:  Re: get occurence constraint in elementation declaration  
>                                                                   |
>   |                                                                           
>                                                                   |
>   |                                                                           
>                                                                   |
>   
> >---------------------------------------------------------------------------------------------------------------------------------------------|
> 
> 
> 
> 
> Hi, Neil,
> 
> The XSParticles of XSComplexTypeDefinition does work. I could get the
> occurrence constraint if they are in ComplexTypeDefinition throught
> particles, such that
> <complexType name=aType>
>     <all minOccur=0 maxOccur=10>
>     ......
>     </all>
> </complexType
> 
> 
> However, I am wondering how to get the max/minOccurs values
> XSElementDeclaration, like
> 
> <element name=a minOccur=0 maxOccur=10>
> 
> ElementDeclaration seems not have any particle. So, where these
> max/minOccur are saved in Xerces?
> 
> Thanks.
> 
> Stephen
> 
> 
> On Fri, 18 Jul 2003, Neil Graham wrote:
> 
> > Hi Stephen,
> >
> > Although the PSVI hasn't been my focus, if you can't get this through the
> > XSParticle interface, I'd think we have a bug.  XSComplexTypeDefinitions
> > will have XSParticles that you can query for their max/minOccurs values;
> > depending on the content model, you may have to interrogate the
> XSParticle
> > for XSModelGroups, which themselves will contain nested XSParticles etc.
> >
> > Hope that helps somewhat...
> >
> > Cheers,
> > Neil
> > Neil Graham
> > XML Parser Development
> > IBM Toronto Lab
> > Phone:  905-413-3519, T/L 969-3519
> > E-mail:  [EMAIL PROTECTED]
> >
> >
> >
> >
> > |---------+---------------------------->
> > |         |           Lingzhi Zhang    |
> > |         |           <[EMAIL PROTECTED]|
> > |         |           du>              |
> > |         |                            |
> > |         |           07/17/2003 08:00 |
> > |         |           PM               |
> > |         |           Please respond to|
> > |         |           xerces-j-user    |
> > |         |                            |
> > |---------+---------------------------->
> >   >
> ---------------------------------------------------------------------------------------------------------------------------------------------|
> 
> >   |
> |
> >   |       To:       [EMAIL PROTECTED]
> |
> >   |       cc:
> |
> >   |       Subject:  get occurence constraint in elementation declaration
> |
> >   |
> |
> >   |
> |
> >   >
> ---------------------------------------------------------------------------------------------------------------------------------------------|
> 
> >
> >
> >
> >
> > Hi,
> >
> > I feel that Xerces might not support getting occurence constraint in
> > elementation declaration. For example, in
> >
> > <element name="a" type="aType" minOccur = 0 maxOccur = unbounded>
> >
> > how to get the minOccur and maxOccur of element a? Does Xerces API
> > support? Thanks.
> >
> > Stephen
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to