I have some troubles in following lines from
org/apache/xerces/impl/dtd/models/SimpleContentModel.java

in xercers-2_2_1


    95      /**
    96       * The element decl pool indices of the first (and optional second)
    97       * child node. The operation code tells us whether the second child
    98       * is used or not.
    99       */
   100      private QName fFirstChild = new QName();
       

   101      /**
   102       * The element decl pool indices of the first (and optional second)
   103       * child node. The operation code tells us whether the second child
   104       * is used or not.
   105       */
   106      private QName fSecondChild = new QName();
       

   145      //
   146      // ContentModelValidator methods
   147      //
       

   171      public int validate(QName[] children, int offset, int length) {
       

   172          //
   173          //  According to the type of operation, we do the correct type 
of
   174          //  content check.
   175          //
   176          switch(fOperator)
   177          {
   178              case XMLContentSpec.CONTENTSPECNODE_LEAF :
   179                  // If there is not a child, then report an error at 
index 0
   180                  if (length == 0)
   181                      return 0;
       

   182                  // If the 0th child is not the right kind, report an 
error at 0
   183                  if (children[offset].rawname != fFirstChild.rawname) {
   184                      return 0;
   185                  }
       

   282      } // validate
       

   283  } // class SimpleContentModel


       
   
Is 
  children[offset].rawname != fFirstChild.rawname) 
correct ?
Maybe      
     !(children[offset].rawname.equals(fFirstChild.rawname))
is better ?

Thanks in advance
luigi  
       

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

Reply via email to