You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by bu...@apache.org on 2004/03/23 00:11:00 UTC

DO NOT REPLY [Bug 27828] - incorrect validation of substitution groups with restriction

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

http://issues.apache.org/bugzilla/show_bug.cgi?id=27828

incorrect validation of substitution groups with restriction





------- Additional Comments From mboos@ca.ibm.com  2004-03-22 23:10 -------
These are two separate issues (though both are found in XSContraints.java)

The first (corresponding to your deriv_1-n_simple.xsd testcase) is the result of
the parser setting the min- and maxOccurs values on the derived choice particle
to the values of the element particle and vice-versa. [1]

The second (deriv-3seq-plus.xsd) takes place because the substitution group
handler is set to null after it is used once for a particle. This happens in
order to prevent endless recursion with substitution groups, but unfortunately
prevents element declarations which are the substitution group affiliations of
other element declarations from being compared with themselves in restrictions,
resulting in an error.

The patch should fix both bugs. The substitution group handlers will not be set
to null. Instead, particles will be checked first in particleValidRestriction to
see if they are the same. [1]

[1] http://www.w3.org/TR/xmlschema-1/#cos-particle-restrict

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