private void validateExpression(Label label) throws Exception {
  Expression location=label.getExpression();
  if (expression != null) {
    String path=expression.getPath();
    String expect=location.getPath();
    if (!path.equals(expect)) {
      throw new PathException("Path '%s' does not match '%s' in %s",path,expect,detail);
    }
  }
 else {
    expression=location;
  }
}

private void validateExpression ( Label label ) throws Exception { Expression location = label . getExpression ( ) ; if ( expression != null ) { String path = expression . getPath ( ) ; String expect = location . getPath ( ) ; if ( ! path . equals ( expect ) ) { throw new PathException ( "Path '%s' does not match '%s' in %s" , path , expect , detail ) ; } } else { expression = location ; } }
this is used to validate the expressions used for a label that this model represents . each label within a model must have an xpath expression , if the expressions do not match then this will throw an exception . if the model contains no labels then it is considered empty and does not need validation .
