lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] calculation summary, questions about xslt


From: Evgeniy Tarassov
Subject: Re: [lmi] calculation summary, questions about xslt
Date: Tue, 10 Oct 2006 17:36:28 +0200

Hello Greg,

Thank you for your answer!

On 10/10/06, Greg Chicares <address@hidden> wrote:
I believe this is intended to address the following "user story":

  https://savannah.nongnu.org/support/?105592
  "Copy and paste calculation summary"

For those purposes, they need only the data, and formatting
doesn't matter.

Ok, understood. I have misinterpreted the situation looking onto the
existing code.

Would you please tell me the names of the functions that do this,
so that I can be sure I'm looking in the right place? I think
there are several different sorts of "spreadsheet" output that
we create in various circumstances.

The function is in ledger_text_format.cpp:~170
void PrintFormTabDelimited
   (Ledger const& ledger_values
   ,std::string const& file_name
   )

and the source code snippets i was referring to ledger_text_format.cpp:~292:

   os << "ProducerName\t\t"      << Invar.value_str("ProducerName"   ) << '\n';

notice the double 'tab' character appended after each row label. If
its not to insure that labels does not truncated, then it should be
some other sort of formatting-sugar.

and the 'for'-loops near the line ledger_text_format.cpp:~384, where
we break header titles into words, add '\t' after each word and align
such a tokenized title vectors to be of the same length. I suppose it
is also some sort of 'visual-formatting' attempts in a tab delimited
data. Please, correct me if i'm wrong and there is a reason for such
complications in the code and in the output data.

The reason for the original question is that it takes some efforts to
express the logic from those for-loops using xslt.

I'd like to keep it simple (or make it simple where it isn't yet).

What I don't see is why plain tab-delimited text isn't the simplest
choice. I imagine that all spreadsheet programs would handle that
well, and in particular the one from ms does.

I'm in favor of simplification in general, and we have much code
that isn't simple enough yet.

After looking at the code above could you please confirm that we have
your benediction to simplify the tab-delimited data as much as
possible (removing unnecessary double '\t\t' and pasting column
headers as is, without no manipulations mentioned above)?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]