[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lmi] Calculation summary XML resources structure (with some example
From: |
Evgeniy Tarassov |
Subject: |
Re: [lmi] Calculation summary XML resources structure (with some examples) |
Date: |
Sun, 29 Oct 2006 15:46:10 +0100 |
> Also, are there any other changes to
> be done or should we consider these formats accepted and continue with the
> next stage of the work?
I...think so, but I guess you need a definitive final blessing,
so let me analyze this carefully. Just to be clear, I think the
formats are pointed to by Evgeniy's 2006-09-21T12:32Z posting:
| schema.xsd - a Schema file describing illustration data (data.xml) and
| column traits file (format.xml)
|
| data.xml - an example of illustration data
|
| format.xml - an example of a column traits file
|
| html.xsl - a working example of an XSL template generating a report in
and exactly which of those should I formally sign off on now?
The following is a snippet from schema.xsd describing (and checking)
double values formatting.
Could you please have a look at it (especially on the regular
expression patterns below in xs:restriction node)? These expressions
should be used to verify the correctness of the generated ledger xml
data.
<xs:annotation>
<xs:documentation>
[...]
| Formats
|
| f0: zero decimals
| f1: zero decimals, commas
| f2: two decimals, commas
| f3: scaled by 100, zero decimals, with '%' at end:
| f4: scaled by 100, two decimals, with '%' at end:
| bp: scaled by 10000, two decimals, with 'bp' at end:
|
| Presumably all use commas as thousands-separators, so that
| an IRR of 12345.67% would be formatted as "12,345.67%".
|
| So the differences are:
| 'precision' (number of decimal places)
| 'scaling factor' (1 by default, 100 for percents,
1000 for 'bp')
| 'units' (empty by default, '%' for
percents, 'bp' for bp)
| and therefore f0 is equivalent to f1
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<!-- update this regular expression for every change in
formatting rules -->
<xs:pattern value="(-?[1-9][0-9]{0,2}(,[0-9]{3})*)|0" /><!-- f0 -->
<xs:pattern value="(-?[1-9][0-9]{0,2}(,[0-9]{3})*)|0" /><!-- f1 -->
<xs:pattern
value="((-?[1-9][0-9]{0,2}(,[0-9]{3})*)|0)\.[0-9]{2}" /><!-- f2 -->
<xs:pattern value="((-?[1-9][0-9]{0,2}(,[0-9]{3})*)|0)%"
/><!-- f3 -->
<xs:pattern
value="((-?(([1-9][0-9]{0,2}(,[0-9]{3})*)|0)\.[0-9]{2}))%" /><!-- f4
-->
<xs:pattern
value="((-?(([1-9][0-9]{0,2}(,[0-9]{3})*)|0)\.[0-9]{2}))bp" /><!-- bp
-->
</xs:restriction>
Thank you in advance!
- Re: [lmi] Calculation summary XML resources structure (with some examples),
Evgeniy Tarassov <=