lmi
[Top][All Lists]
Advanced

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

[lmi] calculation summary, questions about xslt


From: Evgeniy Tarassov
Subject: [lmi] calculation summary, questions about xslt
Date: Tue, 10 Oct 2006 02:23:10 +0200

Hello,

This is a compiled list of questions about xslt resources for
calculation summary part of lmi. The most important if the first one.
The rest is just some small or not so big issues.

0) clipboard data

currently we are going to put tab delimited data into clipboard. I
have noticed that there are several workarounds (hacks?) in the code
that generates the data only to make it prettier once its pasted into
excel. As an example a really complex code that breaks column titles
into words and spawn it onto multiple cells only to try reserve some
space for title not to overlap (since tab delimited data cannot
specify column width).
Do you think that we could put our ledger data into clipboard in
multiple formats so that the end user favourite spreadsheet software
could pick up the format it prefers the most and use? For example we
could put "XML Spreadsheet" (xml based microsoft format for
spreadsheets) _and_ TEXT data (tab delimited) so that if users prefers
excel then he gets the pretty formatted data, and if he uses something
else, then at least he has the data.

The huge 'pro' is that its simple to do (add some formatting to the
existing tab_deimited.xsl template) and it allows us to drop those
hacks from tab delimited data generation code mentioned above.

Microsoft Excel keeps data in the clipboard in the following formats
(only interesting formats):
'Rich Text Format' - MSExcel, OO, contains formatting, but it does
_not_ support column width.
'HTML Format' - MSExcel, OO, different html structure for MS and OO,
could be difficult to make it work in both
'XML Spreadsheet' - MSExcel only. Well documented xml schema, supports
formatting of any kind
'Csv' - tab delimited

I have tested 'XML Spreadsheet' already -- if one puts 'Csv' and 'XML
Spreadsheet' into the clipboard at the same time, then MSExcel picks
up xml and other editors get Csv.

To summarise the question -- do we want to simplify our current 'tab
delimited' data format and in addition to it put 'XML Spreadsheet'
into the clipboard?

1) illustration_reg.xsl

1.1 unknown node 'illustration/scalar/Participating' - it is not
mentioned in the source code. I suppose it's an unimplemented feature
or a simple mistake. Do you think i should remove it or simply ignore
and leave a comment with a FIXME? Context:

   <xsl:text>This is an illustration only. An illustration is not
intended to predict actual performance. Interest rates </xsl:text>
   <xsl:if test="illustration/scalar/Participating='1'"><!--TODO-->
       <xsl:text>, dividends,</xsl:text>
   </xsl:if>
   <xsl:text> and values set forth in the illustration are not
guaranteed.</xsl:text>

1.2 unknown node 'illustration/scalar/NoLapseForever' - same story. I
was unable to find any reference to it in lmi.

1.3 unknown node 'illustration/scalar/OffersRiders'

1.4 unknown node
'illustration/data/newcolumn/address@hidden'Loan']/duration[$counter]/@column_value'

1.5 unknown node 'illustration/scalar/VersionNumber'

2) html.xsl

2.1 the code generating html contains an expression

(is_subject_to_ill_reg(ledger_values.GetLedgerType()))

Do you think that (in xslt) we could express it using values already
exported into xml. Or should we export additional named value?
(another double_scalar value maybe?)

3) schema.xsd

3.1 do we want to separate string_ nodes from double_ nodes?
(string_vector and double_vector)

Keeping strings and (already formatted) numbers in different type of
nodes we could inforce addiotional checks onto the xml data geenrated.
I have added regular expression based restrictions on the values a
double_scalar could get.

4) tab_delimited.xsl
4.1 the code generating CSV formatted data contains some code checking
that e_run_curr_basis_sa_zero is present in
ledger_values.GetRunBases().

       std::vector<e_run_basis> const& bases(ledger_values.GetRunBases());
       if
           (   bases.end()
           !=  std::find(bases.begin(), bases.end(), e_run_curr_basis_sa_zero)
           )
           {

Do you think there is already some way to check that using the already
exported values?


Thank you in advance!

Eugene




reply via email to

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