private ColumnComparator makeColumnComparator(Element elColumn) throws Exception
  {
    NumberName numberName = new NumberName(elColumn);
    String type = elColumn.getAttribute("type").toLowerCase();
    boolean ascending = !(elColumn.getAttribute("order").toLowerCase().equals("descending"));
    String defaultString = elColumn.getAttribute("default");
    
    if (type.equals("integer"))
    {
      return SingleColumnComparator.createIntegerComparator(numberName, ascending, defaultString);
    }
    else if (type.equals("long"))
    {
      return SingleColumnComparator.createLongComparator(numberName, ascending, defaultString);
    }
    else if (type.equals("double"))
    {
      return SingleColumnComparator.createDoubleComparator(numberName, ascending, defaultString);
    }
    else if (type.equals("date"))
    {
      return SingleColumnComparator.createDateComparator(numberName, locale, ascending, defaultString);
    }
    else if (type.equals("string") || type.equals(""))
    {
      return SingleColumnComparator.createStringComparator(numberName, collator, ascending);
    }    
    else
    {
      throw new Exception("Error in <sortlines>: Unknown column type '"+type+"'");
    }
  }