code: void mergeDependsList(Element element)
      {
          String depends = getElementAttribute(element, "depends");
          StringBuffer updatedDepends = new StringBuffer();
  
          if ( depends != null ) {
              updatedDepends.append( depends );
          }
          else {
              depends = "";
          }
  
          ArrayList rules = new ArrayList();
          for ( Iterator i = _rules.iterator(); i.hasNext(); )  
          {
              ValidatorRule rule = ( ValidatorRule ) i.next();
              String name = rule.getRuleName();
              
              if ( depends.indexOf( name ) == -1 ) rules.add( name );
          }
          Collections.sort( rules );
          
          for ( Iterator i = rules.iterator(); i.hasNext(); )  
          {
              if ( updatedDepends.length() > 0 ) updatedDepends.append( ',' );
              updatedDepends.append( ( String ) i.next() );
          }
  
          if ( updatedDepends.length() != 0 )
          {
              element.setAttribute("depends", updatedDepends.toString());
          }
      }
docs: Merge the rule names with the list in the field element's depends attribute.