You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by sa...@apache.org on 2010/11/05 21:03:06 UTC
svn commit: r1031759 -
/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDComplexTypeTraverser.java
Author: sandygao
Date: Fri Nov 5 20:03:06 2010
New Revision: 1031759
URL: http://svn.apache.org/viewvc?rev=1031759&view=rev
Log:
Bug fix: complex type with complex content. Calculation of effective content needs to happen *before* looking at the open content.
Modified:
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDComplexTypeTraverser.java
Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDComplexTypeTraverser.java
URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDComplexTypeTraverser.java?rev=1031759&r1=1031758&r2=1031759&view=diff
==============================================================================
--- xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDComplexTypeTraverser.java (original)
+++ xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDComplexTypeTraverser.java Fri Nov 5 20:03:06 2010
@@ -1530,6 +1530,20 @@ class XSDComplexTypeTraverser extends X
// minOccurs == maxOccurs == 0
}
+ // Effective content
+ //
+ // 3.1 If the explicit content is empty then the appropriate case among the following:
+ // 3.1.1 If the effective mixed is true, then A particle whose properties are as follows:
+ // {min occurs} 1
+ // {max occurs} 1
+ // {term} a model group whose {compositor} is sequence and whose {particles} is empty
+ // 3.1.2 otherwise empty
+ // 3.2 otherwise the explicit content
+ //
+ if (particle == null && isMixed) {
+ particle = XSConstraints.getEmptySequence();
+ }
+
// XML Schema 1.1
//
// When dealing with a complex type that does not have a complexContent
@@ -1554,26 +1568,16 @@ class XSDComplexTypeTraverser extends X
fOpenContent = null;
}
}
-
- // Effective content
- //
- // 3.1 If the explicit content is empty then the appropriate case among the following:
- // 3.1.1 If the effective mixed is true, then A particle whose properties are as follows:
- // {min occurs} 1
- // {max occurs} 1
- // {term} a model group whose {compositor} is sequence and whose {particles} is empty
- // 3.1.2 otherwise empty
- // 3.2 otherwise the explicit content
- //
// XML Schema 1.1
//
// Dealing with a complex type that has no complexContent/simpleContent child
//
// 6.3 Particle of Content type - based on wildcard element
//
- if (particle == null && (isMixed || (!isDerivation && fOpenContent != null))) {
+ if (particle == null && (!isDerivation && fOpenContent != null)) {
particle = XSConstraints.getEmptySequence();
}
+
fParticle = particle;
// -----------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org