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/08/22 15:42:49 UTC
DO NOT REPLY [Bug 10954] -
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
alby@exceloncorp.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|INVALID |
------- Additional Comments From alby@exceloncorp.com 2002-08-22 13:42 -------
Khaled,
what do you think about this patch? It simply moves the check for minOccurs==0
&& maxOccurs==0 before the check for maxOccurs<1. This way we a) don't change
the constraints we have in the code and b) maxOccurs=0 is a valid entry only
when minOccurs=0 (that is what I need to validate this schema)
--- TraverseSchema.cpp 19 Aug 2002 13:46:31 -0000 1.25
+++ TraverseSchema.cpp 22 Aug 2002 13:38:23 -0000
@@ -5346,6 +5346,10 @@
}
}
+ if (minOccurs == 0 && maxOccurs == 0){
+ return;
+ }
+
// Constraint checking for min/max value
if (!isMaxUnbounded) {
@@ -5368,10 +5372,6 @@
if (specNode)
specNode->setMaxOccurs(minOccurs);
}
- }
-
- if (minOccurs == 0 && maxOccurs == 0){
- return;
}
// Constraint checking for 'all' content
Thanks,
Alberto
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org