code: private boolean matchModes(QName m1, QName m2)
    {
      return (((null == m1) && (null == m2))
              || ((null != m1) && (null != m2) && m1.equals(m2)));
    }
docs: Tell if two modes match according to the rules of XSLT.
  
  @param m1 First mode to match
  @param m2 Second mode to match
  
  @return True if the two given modes match