xerces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From el...@apache.org
Subject cvs commit: xml-xerces/java/src/org/apache/xerces/validators/schema TraverseSchema.java
Date Wed, 07 Feb 2001 15:08:50 GMT
elena       01/02/07 07:08:50

  Modified:    java/src/org/apache/xerces/validators/schema
                        TraverseSchema.java
  Log:
  Clean up
  
  Revision  Changes    Path
  1.96      +11 -6     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.95
  retrieving revision 1.96
  diff -u -r1.95 -r1.96
  --- TraverseSchema.java	2001/02/06 21:37:10	1.95
  +++ TraverseSchema.java	2001/02/07 15:08:49	1.96
  @@ -124,7 +124,7 @@
    *  
    * @see org.apache.xerces.validators.common.Grammar
    *
  - * @version $Id: TraverseSchema.java,v 1.95 2001/02/06 21:37:10 lehors Exp $
  + * @version $Id: TraverseSchema.java,v 1.96 2001/02/07 15:08:49 elena Exp $
    */
   public class TraverseSchema implements 
                               NamespacesScope.NamespacesHandler{
  @@ -948,7 +948,7 @@
           else if (varietyProperty.equals(SchemaSymbols.ELT_UNION)) { //traverse union
               union = true;
               baseTypeQNameProperty = content.getAttribute( SchemaSymbols.ATT_MEMBERTYPES);
  -            if (baseTypeQNameProperty != "" ) {
  +            if (!baseTypeQNameProperty.equals("")) {
                   unionMembers = new StringTokenizer( baseTypeQNameProperty );
                   size = unionMembers.countTokens();
               }
  @@ -974,7 +974,7 @@
                   System.out.println("[unionMembers]= " +unionMembers.toString());
               }
           }
  -        if ( baseTypeQNameProperty == "" ) { //must 'see' <simpleType>
  +        if ( baseTypeQNameProperty.equals("") ) { //must 'see' <simpleType>
               //content = {annotation?,simpleType?...}
               content = XUtil.getFirstChildElement(content);
               //check content (annotation?, ...)
  @@ -1001,6 +1001,11 @@
                         return -1;
                 }
               }
  +            else {
  +                 reportSchemaError(SchemaMessageProvider.ListUnionRestrictionError,
  +                        new Object [] { simpleTypeDecl.getAttribute( SchemaSymbols.ATT_NAME
)});
  +                 return -1;
  +            }
           } //end - must see simpleType?
           else { //base was provided - get proper validator. 
               numOfTypes = 1;
  @@ -1032,7 +1037,7 @@
           // move to next child 
           // restriction ->[simpleType]->[facets]  OR
           // restriction ->[facets]
  -        if (baseTypeQNameProperty == "") {  //we already got the first kid of union/list/restriction
  +        if (baseTypeQNameProperty.equals ("")) {  //we already got the first kid of union/list/restriction
               content = XUtil.getNextSiblingElement( content );
           }
           else { //we need to look at first kid of union/list/restriction
  @@ -1106,7 +1111,7 @@
   
           
           else if (list && content!=null) { // report error - must not have any children!
  -            if (baseTypeQNameProperty != "") {
  +            if (!baseTypeQNameProperty.equals("")) {
                   content = checkContent(simpleTypeDecl, content, true);
               }
               else {
  @@ -1116,7 +1121,7 @@
               }
           }
           else if (union && content!=null) { //report error - must not have any children!
  -             if (baseTypeQNameProperty != "") {
  +             if (!baseTypeQNameProperty.equals("")) {
                   content = checkContent(simpleTypeDecl, content, true);
               }
               else {
  
  
  

Mime
View raw message