private static String makeName(String str,int start,int end) throws ParseException {
  String name=str.substring(start,end);
  if (!Naming.isNcname(name))   throw new ParseException("invalid_name");
  return name;
}

private static String makeName ( String str , int start , int end ) throws ParseException { String name = str . substring ( start , end ) ; if ( ! Naming . isNcname ( name ) ) throw new ParseException ( "invalid_name" ) ; return name ; }
extracts a name from a given string ( path ) from the specified start position to the specified end position . it also checks that the extracted name is a valid non qualified name ( local name ) .
