[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xerces-cvs
Subject:    cvs commit: xml-xerces/java/src/org/apache/xerces/validators/schema TraverseSchema.java
From:       neilg () apache ! org
Date:       2001-03-30 19:15:50
[Download RAW message or body]

neilg       01/03/30 11:15:50

  Modified:    java/src/org/apache/xerces/validators/schema
                        TraverseSchema.java
  Log:
  bugfixes in support of final and block
  
  Revision  Changes    Path
  1.120     +8 -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.119
  retrieving revision 1.120
  diff -u -r1.119 -r1.120
  --- TraverseSchema.java	2001/03/29 21:13:34	1.119
  +++ TraverseSchema.java	2001/03/30 19:15:49	1.120
  @@ -125,7 +125,7 @@
    *  
    * @see org.apache.xerces.validators.common.Grammar
    *
  - * @version $Id: TraverseSchema.java,v 1.119 2001/03/29 21:13:34 neilg Exp $
  + * @version $Id: TraverseSchema.java,v 1.120 2001/03/30 19:15:49 neilg Exp $
    */
   public class TraverseSchema implements 
                               NamespacesScope.NamespacesHandler{
  @@ -1509,6 +1509,9 @@
           int finalProperty = 0;
           if(finalAttr != null) 
               finalProperty = parseFinalSet(finalAttr.getValue());
  +        else
  +            finalProperty = parseFinalSet(null);
  +
           // REVISIT:  is "extension" allowed???
           
           // if we have a nonzero final , store it in the hash...
  @@ -3020,7 +3023,7 @@
              if (typeInfo.derivedBy == SchemaSymbols.RESTRICTION) {
                 // check to see if the baseType permits derivation by restriction
                 if((typeInfo.baseComplexTypeInfo.finalSet & \
                SchemaSymbols.RESTRICTION) != 0)
  -                    throw new ComplexTypeRecoverableError("Derivation by extension \
is forbidden by either the base type " + fStringPool.toString(baseName.localpart) + " \
or the schema");  +                    throw new \
ComplexTypeRecoverableError("Derivation by restriction is forbidden by either the \
base type " + fStringPool.toString(baseName.localpart) + " or the schema");  
                 //
                 //REVISIT: !!!really hairy stuff to check the particle derivation OK \
in 5.10  @@ -4155,7 +4158,7 @@
           if (!ref.equals("")) {
               //REVISIT top level check for ref 
           	if (!type.equals("") || (elementMiscFlags > 0) 
  -					|| (finalSet > 0) || (blockSet > 0)
  +					|| (finalSetStr != null && finalSet > 0) || (blockSetStr != null && blockSet \
> 0)  || !dflt.equals("") || !fixed.equals(""))
               	reportSchemaError(SchemaMessageProvider.BadAttWithRef, null);
   			if (!name.equals(""))
  @@ -6122,8 +6125,10 @@
   
       private int parseFinalSet (String finalString)  throws Exception
       {
  -            if( finalString == null) 
  +            if( finalString == null) {
  +            System.err.println("what's the deal?  " + fFinalDefault);
                   return fFinalDefault;
  +                }
               else if ( finalString.equals (SchemaSymbols.ATTVAL_POUNDALL) ) {
                       return \
SchemaSymbols.EXTENSION+SchemaSymbols.LIST+SchemaSymbols.RESTRICTION+SchemaSymbols.UNION;
  } else {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic