src/tools/DataFileEngineXml.cpp
static
std::string
translate_varname(const std::string& varname)
{
  std::string new_varname;
  if (varname.find_first_of(".") == std::string::npos) {
    new_varname = "main/" + varname;
  } 
  else {
    int n_nested = 0;
    new_varname = varname;
    for (size_t i = 0; i < new_varname.size(); ++i) {
      if (new_varname[i] == '.') {
	new_varname[i] = '/';
	++n_nested;
	if (n_nested > 1) {
	  break;
	}
      }
    }
  }
  //  LOG << "Name conversion: \"" << varname << "\" to \"" << new_varname << "\"\n";
  return new_varname;  
}
// Varnames coming in are separated into groups and subgroups with the
// delimiter ".", while the XML request uses the delimiter
// "/". Moreover, the XML driver requires one or two groups, so the
// following function does these conversions:
//   "a"       -> "main/a"
//   "a.b"     -> "a/b"
//   "a.b.c"   -> "a/b/c"
//   "a.b.c.d" -> "a/b/c.d" (the delimiter "." has no special meaning in the output)
Varnames coming in are separated into groups and subgroups with the
delimiter ".", while the XML request uses the delimiter
"/".
Varnames coming in are separated into groups and subgroups with the delimiter " . " while the XML request uses the delimiter " / " .
static
std::string
translate_varname(const std::string& varname)
{
  std::string new_varname;
  if (varname.find_first_of(".") == std::string::npos) {
    new_varname = "main/" + varname;
  } 
  else {
    int n_nested = 0;
    new_varname = varname;
    for (size_t i = 0; i < new_varname.size(); ++i) {
      if (new_varname[i] == '.') {
	new_varname[i] = '/';
	++n_nested;
	if (n_nested > 1) {
	  break;
	}
      }
    }
  }
  return new_varname;  
}
static std :: string translate_varname ( const std :: string & varname ) { std :: string new_varname ; if ( varname . find_first_of ( " " ) == std :: string :: npos ) { new_varname = " " + varname ; } else { int n_nested = 0 ; new_varname = varname ; for ( size_t i = 0 ; i < new_varname . size ( ) ; ++ i ) { if ( new_varname [ i ] == ' ' ) { new_varname [ i ] = ' ' ; ++ n_nested ; if ( n_nested > 1 ) { break ; } } } } return new_varname ; }
Varnames coming in are separated into groups and subgroups with the
delimiter ".
Varnames coming in are separated into groups and subgroups with the delimiter " .
//  LOG << "Name conversion: \"" << varname << "\" to \"" << new_varname << "\"\n";