[
Lists Home |
Date Index |
Thread Index
]
- From: Jim Ancona <jim@anconafamily.com>
- To: xml-dev@lists.xml.org
- Date: Fri, 20 Oct 2000 13:19:10 -0400
--- "Tolkin, Steve" <Steve.Tolkin@FMR.COM> wrote:
> I am looking for advice about the best way to store rounded numbers, in
> addition to the actual numbers, in an XML document.
<snip>
> Plan 1. An attribute
> <netAssets rounded="568000">567890</netAssets>
>
> Plan 2a. A separate element, in the same name space
> <netAssets>567890</netAssets>
> <netAssetsRounded>568000</netAssetsRounded>
>
> Plan 2b A minor variation here would be to use a name with a "separator"
> character, e.g.
> <netAssets.Rounded>
>
> Plan 3: A separate element, in a separate namespace
> <netAssets>567890</netAssets>
> <Rounded:netAssets>568000</Rounded:netAssets>
>
Since the rounded version is really a different representation of the
amount, how about something like:
<netAssets>
<actualValue>567890</actualValue>
<roundedValue>568000</roundedValue>
</netAssets>
or even better:
<netAssets>
<value>567890</value>
<value RoundingLevel="1000">568000</value>
</netAssets>
where an unspecified RoundingLevel level means "not rounded".
Jim
=====
Jim Ancona
jim@anconafamily.com jancona@xevo.com
|