sandygao    2003/01/20 08:59:22

  Modified:    java/src/org/apache/xerces/impl/xs XSConstraints.java
               java/src/org/apache/xerces/impl/xs/traversers
                        XSDComplexTypeTraverser.java
  Log:
  1. Changes for Erratum E1-15: if derived CT is mixed, base must be too.
  2. Error code change as per Erratum E1-15.
  
  Revision  Changes    Path
  1.31      +3 -3      xml-xerces/java/src/org/apache/xerces/impl/xs/XSConstraints.java
  
  Index: XSConstraints.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xerces/java/src/org/apache/xerces/impl/xs/XSConstraints.java,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- XSConstraints.java        16 Jan 2003 18:37:36 -0000      1.30
  +++ XSConstraints.java        20 Jan 2003 16:59:21 -0000      1.31
  @@ -429,7 +429,7 @@
                     if (derivedParticle==null && (!(baseParticle==null ||
                                                  baseParticle.emptiable()))) {
                       reportSchemaError(errorReporter,ctLocators[j],
  -                                      "derivation-ok-restriction.5.2",
  +                                      "derivation-ok-restriction.5.2.2",
                                         new Object[]{types[j].fName});
                     }
                     else if (derivedParticle!=null &&
  @@ -445,7 +445,7 @@
                                           e.getKey(),
                                           e.getArgs());
                         reportSchemaError(errorReporter, ctLocators[j],
  -                                        "derivation-ok-restriction.5.3",
  +                                        "derivation-ok-restriction.5.3.2",
                                           new Object[]{types[j].fName});
                       }
                   }
  
  
  
  1.29      +6 -6      
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.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- XSDComplexTypeTraverser.java      20 Jan 2003 15:47:24 -0000      1.28
  +++ XSDComplexTypeTraverser.java      20 Jan 2003 16:59:22 -0000      1.29
  @@ -464,11 +464,11 @@
                       throw new ComplexTypeRecoverableError();
   
                   //check that this datatype validator is validly derived from the 
base
  -                //according to derivation-ok-restriction 5.1.1
  +                //according to derivation-ok-restriction 5.1.2.1
   
                   if (!XSConstraints.checkSimpleDerivationOk(dv, baseValidator,
                                                              
baseValidator.getFinal())) {
  -                    throw new 
ComplexTypeRecoverableError("derivation-ok-restriction.5.1.1",
  +                    throw new 
ComplexTypeRecoverableError("derivation-ok-restriction.5.1.2.1",
                              new Object[]{fName},
                              simpleContent);
                   }
  @@ -700,9 +700,9 @@
               // traversed so that occurrence information is correct.
   
               
  -            if (fParticle!=null && baseContent==null) {
  -                //REVISIT - need better error msg
  -                throw new 
ComplexTypeRecoverableError("derivation-ok-restriction.5.3",
  +            if (fContentType == XSComplexTypeDecl.CONTENTTYPE_MIXED &&
  +                baseType.getContentType() != XSComplexTypeDecl.CONTENTTYPE_MIXED) {
  +                throw new 
ComplexTypeRecoverableError("derivation-ok-restriction.5.3.1.2",
                                             new Object[]{fName}, complexContent);
               }
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to