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 bu...@apache.org on 2002/07/18 18:45:15 UTC

DO NOT REPLY [Bug 10954] New: - maxOccurs="0" is considered an error

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10954>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10954

maxOccurs="0" is considered an error

           Summary: maxOccurs="0" is considered an error
           Product: Xerces-C++
           Version: Nightly build (please specify the date)
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: Major
          Priority: Other
         Component: Validating Parser (Schema) (Xerces 1.5 or up only)
        AssignedTo: xerces-c-dev@xml.apache.org
        ReportedBy: alby@exceloncorp.com


Running SaxCount on the attached XML shows the error "Invalid value '0' for 
attribute: 'maxOccurs'." even if the specs say that maxOccurs must be a 
(xsd:nonNegativeInteger | "unbounded"). The error is raiseb by 
TraverseSchema::checkMinMax, when maxOccurs is tested against 1 instead of 0

This is the patch I suggest (done against the latest CVS sources)

diff -r1.23 TraverseSchema.cpp
5353c5353
<         if (maxOccurs < 1) {
---
>         if (maxOccurs < 0) {


Alberto

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