You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by er...@locus.apache.org on 2000/10/10 22:00:49 UTC
cvs commit: xml-xerces/java/src/org/apache/xerces/validators/common XMLValidator.java
ericye 00/10/10 13:00:49
Modified: java/src/org/apache/xerces/validators/common
XMLValidator.java
Log:
fix a bug in TraverseSchema, should have import the base type content spec tree instead of concatenate it directly
Revision Changes Path
1.84 +13 -8 xml-xerces/java/src/org/apache/xerces/validators/common/XMLValidator.java
Index: XMLValidator.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/validators/common/XMLValidator.java,v
retrieving revision 1.83
retrieving revision 1.84
diff -u -r1.83 -r1.84
--- XMLValidator.java 2000/10/10 19:51:05 1.83
+++ XMLValidator.java 2000/10/10 20:00:47 1.84
@@ -111,7 +111,7 @@
/**
* This class is the super all-in-one validator used by the parser.
*
- * @version $Id: XMLValidator.java,v 1.83 2000/10/10 19:51:05 ericye Exp $
+ * @version $Id: XMLValidator.java,v 1.84 2000/10/10 20:00:47 ericye Exp $
*/
public final class XMLValidator
implements DefaultEntityHandler.EventHandler,
@@ -2516,16 +2516,21 @@
break;
}
baseTypeInfo = baseTypeInfo.baseComplexTypeInfo;
- String baseTName = baseTypeInfo.typeName;
- if (!baseTName.startsWith("#")) {
- int comma = baseTName.indexOf(',');
- aGrammarNSIndex = fStringPool.addSymbol(baseTName.substring(0,comma).trim());
- if (aGrammarNSIndex != fGrammarNameSpaceIndex) {
- if ( !switchGrammar(aGrammarNSIndex) ) {
- break; //exit the loop in this case
+ if (baseTypeInfo != null) {
+ String baseTName = baseTypeInfo.typeName;
+ if (!baseTName.startsWith("#")) {
+ int comma = baseTName.indexOf(',');
+ aGrammarNSIndex = fStringPool.addSymbol(baseTName.substring(0,comma).trim());
+ if (aGrammarNSIndex != fGrammarNameSpaceIndex) {
+ if ( !switchGrammar(aGrammarNSIndex) ) {
+ break; //exit the loop in this case
+ }
}
}
}
+ }
+ if (elementIndex == -1) {
+ switchGrammar(fGrammarNameSpaceIndex);
}
}
//if still can't resolve it, try TOP_LEVEL_SCOPE AGAIN