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/08/04 23:28:48 UTC

cvs commit: xml-xerces/java/src/org/apache/xerces/validators/schema TraverseSchema.java

ericye      00/08/04 14:28:47

  Modified:    java/src/org/apache/xerces/validators/schema
                        TraverseSchema.java
  Log:
  if a complexType has a base type whose content is empty,
  and this type has not "content" value, no content model
  defined, then it is natural it should have empty content.
  
  Revision  Changes    Path
  1.43      +8 -1      xml-xerces/java/src/org/apache/xerces/validators/schema/TraverseSchema.java
  
  Index: TraverseSchema.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/validators/schema/TraverseSchema.java,v
  retrieving revision 1.42
  retrieving revision 1.43
  diff -u -r1.42 -r1.43
  --- TraverseSchema.java	2000/08/01 23:54:17	1.42
  +++ TraverseSchema.java	2000/08/04 21:28:43	1.43
  @@ -374,7 +374,7 @@
    *  
    * @see                  org.apache.xerces.validators.common.Grammar
    *
  - * @version $Id: TraverseSchema.java,v 1.42 2000/08/01 23:54:17 ericye Exp $
  + * @version $Id: TraverseSchema.java,v 1.43 2000/08/04 21:28:43 ericye Exp $
    */
   
   public class TraverseSchema implements 
  @@ -1891,6 +1891,13 @@
           // REVISIT: this is when sees a topelevel <complexType name="abc">attrs*</complexType>
           if (content.length() == 0 && base.length() == 0 && left == -2) {
               contentSpecType = XMLElementDecl.TYPE_ANY;
  +        }
  +
  +        if (content.length() == 0 && simpleTypeValidator == null && left == -2 ) {
  +            if (base.length() > 0 && baseTypeInfo != null 
  +                && baseTypeInfo.contentType == XMLElementDecl.TYPE_EMPTY) {
  +                contentSpecType = XMLElementDecl.TYPE_EMPTY;
  +            }
           }
   
           if ( DEBUGGING )