sandygao 2003/02/07 14:34:57
Modified: java/src/org/apache/xerces/impl/xs XSParticleDecl.java
Log:
When a particle is empty, the min/max effective ranges should both be 0.
Revision Changes Path
1.10 +7 -1
xml-xerces/java/src/org/apache/xerces/impl/xs/XSParticleDecl.java
Index: XSParticleDecl.java
===================================================================
RCS file:
/home/cvs/xml-xerces/java/src/org/apache/xerces/impl/xs/XSParticleDecl.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- XSParticleDecl.java 14 Jan 2003 20:21:45 -0000 1.9
+++ XSParticleDecl.java 7 Feb 2003 22:34:57 -0000 1.10
@@ -131,6 +131,9 @@
* values from the spec are retrievable by these methods.
*/
public int minEffectiveTotalRange() {
+ if (fType == this.PARTICLE_EMPTY) {
+ return 0;
+ }
if (fType == PARTICLE_MODELGROUP) {
return ((XSModelGroupImpl)fValue).minEffectiveTotalRange() * fMinOccurs;
}
@@ -138,6 +141,9 @@
}
public int maxEffectiveTotalRange() {
+ if (fType == this.PARTICLE_EMPTY) {
+ return 0;
+ }
if (fType == PARTICLE_MODELGROUP) {
int max = ((XSModelGroupImpl)fValue).maxEffectiveTotalRange();
if (max == SchemaSymbols.OCCURRENCE_UNBOUNDED)
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]