You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by Khaled Noaman <kn...@ca.ibm.com> on 2002/04/04 16:54:49 UTC

Re: Q: signed/unsigned "unbounded" maxOccurs in schema validation

Hi Martin,

I agree with you regarding the inconsistency between
TraverseSchema::isOccurenceRangeOK(int,int,int,int) and
ContentSpecNode::setMaxOccurs(unsigned int). We have
fixed that. The min/maxOccurs are now passed/stored as
int values.

Regards,
Khaled


Martin Kalen wrote:

> In TraverseSchema.cpp, line 5426 in the v1.7.0 release, there is an
> assignment of
> SchemaSymbols::UNBOUNDED (defined in SchemaSymbols.hpp to be -1)
> to the unsigned integer maxOccurs, used in a call to
> ContentSpecNode::setMaxOccurs(unsigned int).
>
> Of course this gives a compiler warning (with several different
> compilers) about passing a negative value as unsigned int. Even the
> comment about the private field fMaxOccurs in ContentSpecNode.hpp says
> that -1 is the unbounded value, yet the field is declared as "unsigned
> int".
>
> There seems to be an inconsistency between e.g.
> TraverseSchema::isOccurenceRangeOK(int,int,int,int) and
> ContentSpecNode::setMaxOccurs(unsigned int).
>
> Any thoughts on this?
>
>     Martin
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org