mrglavas    2005/05/24 18:37:46

  Modified:    java/src/org/apache/xerces/impl/dv/xs XSSimpleTypeDecl.java
  Log:
  Fill in built-in kind field in setRestrictionValues(), setListValues() and 
setUnionValues().
  
  When a declaration pool has been set on the SchemaDVFactory the methods which
  fill in the XSSimpleTypeDecl never set the built-in kind. This causes 
validation of
  enumerations to fail since we now compare the type of the value to the type 
of each
  enumeration member.
  
  Revision  Changes    Path
  1.70      +13 -1     
xml-xerces/java/src/org/apache/xerces/impl/dv/xs/XSSimpleTypeDecl.java
  
  Index: XSSimpleTypeDecl.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xerces/java/src/org/apache/xerces/impl/dv/xs/XSSimpleTypeDecl.java,v
  retrieving revision 1.69
  retrieving revision 1.70
  diff -u -r1.69 -r1.70
  --- XSSimpleTypeDecl.java     10 May 2005 15:36:42 -0000      1.69
  +++ XSSimpleTypeDecl.java     25 May 2005 01:37:46 -0000      1.70
  @@ -477,6 +477,10 @@
                
                //we also set fundamental facets information in case 
applyFacets is not called.
                caclFundamentalFacets();
  +        
  +        // Inherit from the base type
  +        fBuiltInKind = base.fBuiltInKind;
  +        
                return this;
        }
        
  @@ -500,6 +504,10 @@
                
                //setting fundamental facets
                caclFundamentalFacets();
  +        
  +        // Values of this type are lists
  +        fBuiltInKind = XSConstants.LIST_DT;
  +        
                return this;
        }
        
  @@ -526,6 +534,10 @@
                
                //setting fundamental facets
                caclFundamentalFacets();
  +        
  +        // No value can be of this type, so it's unavailable.
  +        fBuiltInKind = XSConstants.UNAVAILABLE_DT;
  +        
                return this;
        }
        
  
  
  

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

Reply via email to