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 2002/03/06 00:04:13 UTC
cvs commit: xml-xerces/java/src/org/apache/xerces/impl/xs/traversers XSDComplexTypeTraverser.java
sandygao 02/03/05 15:04:13
Modified: java/src/org/apache/xerces/impl/xs/traversers
XSDComplexTypeTraverser.java
Log:
When an error occurs when we traverse a complex type, to avoid redundant
error messages, we also need an attribute wildcard with processContents "skip".
Revision Changes Path
1.14 +9 -4 xml-xerces/java/src/org/apache/xerces/impl/xs/traversers/XSDComplexTypeTraverser.java
Index: XSDComplexTypeTraverser.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/xs/traversers/XSDComplexTypeTraverser.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- XSDComplexTypeTraverser.java 18 Feb 2002 22:30:25 -0000 1.13
+++ XSDComplexTypeTraverser.java 5 Mar 2002 23:04:13 -0000 1.14
@@ -91,7 +91,7 @@
* ((group | all | choice | sequence)?,
* ((attribute | attributeGroup)*, anyAttribute?))))
* </complexType>
- * @version $Id: XSDComplexTypeTraverser.java,v 1.13 2002/02/18 22:30:25 sandygao Exp $
+ * @version $Id: XSDComplexTypeTraverser.java,v 1.14 2002/03/05 23:04:13 sandygao Exp $
*/
class XSDComplexTypeTraverser extends XSDAbstractParticleTraverser {
@@ -106,6 +106,8 @@
private static final boolean DEBUG=false;
private static XSParticleDecl fErrorContent=null;
+ private static XSWildcardDecl fErrorWildcard=null;
+
private SchemaDVFactory schemaFactory = SchemaDVFactory.getInstance();
private class ComplexTypeRecoverableError extends Exception {
@@ -937,6 +939,9 @@
//
typeInfo.fContentType = XSComplexTypeDecl.CONTENTTYPE_MIXED;
typeInfo.fParticle = getErrorContent();
+ // REVISIT: do we need to remove all attribute uses already added into
+ // the attribute group? maybe it's ok to leave them there. -SG
+ typeInfo.fAttrGrp.fAttributeWC = fErrorWildcard;
return;
@@ -947,10 +952,10 @@
fErrorContent = new XSParticleDecl();
fErrorContent.fType = XSParticleDecl.PARTICLE_SEQUENCE;
XSParticleDecl particle = new XSParticleDecl();
- XSWildcardDecl wildcard = new XSWildcardDecl();
- wildcard.fProcessContents = XSWildcardDecl.WILDCARD_SKIP;
+ fErrorWildcard = new XSWildcardDecl();
+ fErrorWildcard.fProcessContents = XSWildcardDecl.WILDCARD_SKIP;
particle.fType = XSParticleDecl.PARTICLE_WILDCARD;
- particle.fValue = wildcard;
+ particle.fValue = fErrorWildcard;
particle.fMinOccurs = 0;
particle.fMaxOccurs = SchemaSymbols.OCCURRENCE_UNBOUNDED;
fErrorContent.fValue = particle;
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org