lmi
[Top][All Lists]
Advanced

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

Re: [lmi] Calculation summary: tidying up loose ends


From: Evgeniy Tarassov
Subject: Re: [lmi] Calculation summary: tidying up loose ends
Date: Tue, 7 Nov 2006 17:19:06 +0100

On 11/7/06, Wendy Boutin <address@hidden> wrote:
This is a list of loose ends that I think need tidying for our release;
I've also included a few comments from my testing:

* Scalar data formatting tags

I'm still not sure I completely understands where this stands.
Are right- and left-justified tags available for the scalar
data in the headers? If yes, how can I use them? If no, is
this something you can handle this week?

I'm sorry, but i dont quite understand what are we talking about.
If you mean the data in the table with vector values, then you could
add alignment directly to the cells (align="right") like so:
File html.xsl:
    <xsl:for-each select="$headers">
-        <th width="{$width}%" valign="top">
+        <th width="{$width}%" valign="top" align="right">
        <xsl:choose>
and
                <xsl:variable name="basis" select="@basis"/>
-                <td>
+               <td align="right">
                    <xsl:choose>

or, do  you want to be able to specify alignment on a per-column
basis? The data output is produced in a cycle and such per-column
adjustments will need some more complicated modifications to the code.

If you mean the scalar data which is located above the table (example):
   Male, Nontobacco, age 45
   23,844.41 guaranteed premium         
                
   22,110.68 initial guideline level premium    
   239,162.50 initial guideline single premium  
   55,394.15 initial seven-pay premium  
   Non-MEC      
                
   55,394.15 initial target premium     
   1,000,000 initial base specified amount      
   0 initial term specified amount      
   1,000,000 initial total specified amount     
   CT state of jurisdiction     

then i fear that there is no alignment at all in the current code. If
it the feature you want, could you please explain how should it be
aligned (should it be formatted like in a Spreadsheet editor, with
numbers in an (invisible) column and text in another column, like so
(fixed width font):
   55,394.15 initial target premium     
   1,000,000 initial base specified amount      
   0         initial term specified amount      
   1,000,000 initial total specified amount     
   CT        state of jurisdiction      
or maybe like that (fixed width font):
   55,394.15 initial target premium     
   1,000,000 initial base specified amount      
           0 initial term specified amount      
   1,000,000 initial total specified amount     
          CT state of jurisdiction      

* Pasted data doesn't correspond to original data

[stripped]

Essentially, 'Copy calculation summary' should have the set of
scalar data that contains 'CT state of jurisdiction', and 'Copy
spreadsheet data' should have the set of scalar data that contains
'ProducerName'. It is still key to keep the disclaimer you've
added, regardless of what data gets pasted to the spreadsheet.


Oh, sorry -- it was a misunderstanding. The calculation summary copied
into the clipboard (Ctrl-C) had exactly the same header as the
detailed TSV data for spreadsheets (Ctrl-Shift-C). I have fixed that
and will commit the changes tonight.

While we're discussing the 'Ctrl-Shift-R' output, I'd like to
spike out a defect, I think. Try this:
  'Alt F N C', then
  'Ctrl-Shift-R', then
  'Ctrl-C', then
  open spreadsheet program and paste the clipboard
I observe 'AttainedAge' data in Column 'B', which shouldn't be
in the pasted values because it isn't a column in the on-screen
calculation summary. 'AttainedAge' is certainly data that's on
an individual calculation summary, but not a composite. We only

In the original lmi code (before we start using xml/xslt) there was no
title for the first column for both single and composite calculation
summary. Is it the exact behaviour to replicate in the current code?
Or maybe something more logical like:
- calculation summary for an individual:
 for the first column put title "Age" in both HTML and TSV outputs
- calculation summary for a composite:
 the first column still present but has no title and has value range
[0-99] (both in HTML and TSV)

* Configuring 'install' for new *.xml, *.xsd, and *.xsl

Greg and I use this command to run 'lmi':
  c:/opt/lmi/bin[3]$./lmi_wx_shared.exe --ash_nazg --data_path=../data
but we're both putting these files:
  format.xml
  schema.xsd
  common.xsl
  html.xsl
  tab_delimited.xsl
in different directories to make lmi use the updated files:
  mine  c:/opt/lmi/bin
  Greg  c:/opt/lmi/data

If I try running lmi with the files in Greg's location then I
observe this message:
[stripped]
Error formatting ledger values as html: 'Unable to parse xsl stylesheet
file 'html.xsl': Parser failed.
[stripped]

Could you please help me understand where these really
belong, so I can be sure our 'install' target is correct?

Let me describe exactly where does the current code looks for templates.
configurable_settings contains a node xslt_directory which contains
the path to the XML related files (*.xml, *.xsl, *.xsd). When lmi
needs to perform an XSL transformation it reads the file name from
configurable_settings, then prepends
configurable_settings::xslt_directory and loads the file.
For example:
<configurable_settings>
 <xslt_directory>/home/lmi/data</xslt_directory>
 <xslt_html_filename>html.xsl</xslt_html_filename>
</configurable_settings>
when we need to produce html version of calculation summary the code is:

std::string path
   = configurable_settings::instance().xslt_directory()
   + configurable_settings::instance().xslt_html_filename();

Now i do realize that if the xslt_directory is not specified or empty
then it is treated as a relative path, but the problem is that this
path is relative to the executable (current directory) and not to the
configurable_settings.xml.

To workaround it you could specify an absolute path in your
configurable_settings.xml. Like so:
- configurable_settings.xml in Greg's directory (c:/opt/lmi/data):
<configurable_settings>
 <xslt_directory>c:/opt/lmi/data</xslt_directory>
</configurable_settings>

and

- configurable_settings.xml in your directory (c:/opt/lmi/bin):
<configurable_settings>
 <xslt_directory>c:/opt/lmi/bin</xslt_directory>
</configurable_settings>


I think the best approach would be to treat the any such a relative
path to be relative to the configurable_settings.xml location. Th
problem however is that configurable_settings.xml could be loaded from
two locations (configurable_settings.cpp::~100) and once the settings
are loaded the filename is discarded:
- '/etc/opt/lmi/'
- data directory (specified with --data_path=<path>)

Do you think we want to treat relative paths as relative to:
1) the real configurable_settings.xml path
or
2) data directory

The first option will necessite some (light) modifications to
configurable_settings.?pp while the second one would be rather
straightforward.




reply via email to

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