You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by lm...@apache.org on 2001/05/09 23:47:54 UTC

cvs commit: xml-xerces/java/src/org/apache/xerces/validators/schema SchemaGrammar.java

lmartin     01/05/09 14:47:53

  Modified:    java/src/org/apache/xerces/validators/schema
                        SchemaGrammar.java
  Log:
  added a new utility method to find attributes in a list
  
  Revision  Changes    Path
  1.19      +10 -3     xml-xerces/java/src/org/apache/xerces/validators/schema/SchemaGrammar.java
  
  Index: SchemaGrammar.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/validators/schema/SchemaGrammar.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- SchemaGrammar.java	2001/04/05 21:30:47	1.18
  +++ SchemaGrammar.java	2001/05/09 21:47:52	1.19
  @@ -60,7 +60,7 @@
    * @author Eric Ye
    *         
    * @see    
  - * @version $Id: SchemaGrammar.java,v 1.18 2001/04/05 21:30:47 neilg Exp $
  + * @version $Id: SchemaGrammar.java,v 1.19 2001/05/09 21:47:52 lmartin Exp $
    */
   package org.apache.xerces.validators.schema;
   
  @@ -440,6 +440,13 @@
               return -1;
           }
           int attDefIndex = getFirstAttributeDeclIndex(elementIndex);
  +        return findAttributeDecl(attDefIndex, attribute);
  +
  +    } // getAttributeDeclIndex (int,QName)
  +
  +    public int findAttributeDecl(int attListHead, QName attribute) {
  +
  +        int attDefIndex = attListHead;                                  
           while (attDefIndex != -1) {
               getAttributeDecl(attDefIndex, fTempAttributeDecl);
               if (fTempAttributeDecl.name.localpart == attribute.localpart &&
  @@ -449,8 +456,8 @@
               attDefIndex = getNextAttributeDeclIndex(attDefIndex);
           }
           return -1;
  -    } // getAttributeDeclIndex (int,QName)
  -
  +     }
  +         
       /**
        *@return the new contentSpec Index
        */
  
  
  

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