xerces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ne...@apache.org
Subject cvs commit: xml-xerces/java/src/org/apache/xerces/validators/schema TraverseSchema.java
Date Fri, 09 Feb 2001 22:01:28 GMT
neilg       01/02/09 14:01:27

  Modified:    java/src/org/apache/xerces/validators/schema
                        TraverseSchema.java
  Log:
  Forgot several things from the last commit (including the log message...)
  
  1.  Fixed group decl traversal implementation so that we neither ignore globally-declared
  groups nor process them multiple times if they're referenced.  Similar
  fix for attribute group declarations.
  
  2.  Considerable cleanup of traverseGroupDecl, traverseGroupDeclFromAnotherSchema,
  traverseAttributeGroupDecl, traverseAllDecl.
  3.  Fixed a bug in traverseAllDecl which caused an infinite loop if elements with maxOccurs=0
were present in an <all> decl.
  4.  Fixed a bug which caused nested elements in instance documents referring to a schema
without a targetNamespace to be given a scope which precluded them from matching their declarations
in the schema.  This bug appears to relate to the schema identity constraint implementation
and there's a possibility this fix could break it.
  
  Revision  Changes    Path
  1.99      +6 -3      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.98
  retrieving revision 1.99
  diff -u -r1.98 -r1.99
  --- TraverseSchema.java	2001/02/09 21:47:08	1.98
  +++ TraverseSchema.java	2001/02/09 22:01:26	1.99
  @@ -124,7 +124,7 @@
    *  
    * @see org.apache.xerces.validators.common.Grammar
    *
  - * @version $Id: TraverseSchema.java,v 1.98 2001/02/09 21:47:08 neilg Exp $
  + * @version $Id: TraverseSchema.java,v 1.99 2001/02/09 22:01:26 neilg Exp $
    */
   public class TraverseSchema implements 
                               NamespacesScope.NamespacesHandler{
  @@ -4377,7 +4377,6 @@
                   contentSpecIndex = traverseGroupDecl(referredGroup);
               }
               
  -			System.err.println("group name being ref'd is " + ref + " and its contentSpec is " +
contentSpecIndex);
               return contentSpecIndex;
           }
   		String qualifiedGroupName = fTargetNSURIString + "," + groupName;
  @@ -4405,7 +4404,11 @@
               reportSchemaError(SchemaMessageProvider.GroupContentRestricted,
                                 new Object [] { "group", childName });
           }
  -System.err.println("we got here!");        
  +        if (child != null && XUtil.getNextSiblingElement(child) != null) {
  +            illegalChild = true;
  +            reportSchemaError(SchemaMessageProvider.GroupContentRestricted,
  +                              new Object [] { "group", childName });
  +        }
           if ( ! illegalChild && child != null) {
               index = expandContentModel( index, child);
           }
  
  
  

Mime
View raw message