Re: data types and inheritance
- From: Bruno Haible <bruno clisp org>
- To: Roozbeh Pournader <roozbeh farsiweb info>
- Cc: GNOME Locale mailing list <locale-list gnome org>
- Subject: Re: data types and inheritance
- Date: Tue, 16 Aug 2005 17:38:14 +0200
Roozbeh Pournader wrote:
> Well, I'm not sure how we want to so some of the CLDR things, but the
> way CLDR wants to look at most of the data is mostly string->string
> mappings, using XPath as the key. See Appendix I: Inheritance and
> Validity:
>
> http://www.unicode.org/reports/tr35/#Inheritance_and_Validity
>
> The parts it doesn't do so, are three things:
>
> 1) Aliases: These are relative XPath pointers into this or another tree.
> We should probably expand this at "compile time".
> ...
> But I guess we would be much more memory efficient if we don't stick to
> the XPath key model.
I think this entire inheritance and alias resolution should be done
during the transformation from XML format to binary mmapable format
(which I'll call "cooking").
Why?
- A single element, say, the decimal separator <numbers><symbols><decimal>,
is expected to have a single value. The runtime routines that need this
value don't care whether it has been fetched from somewhere else
through inheritance, or whether it was specified explicitly in the
most specific XML file.
- The runtime routines want to fetch this value as quickly as possible.
Ideally in a single memory access. The purpose of the cooking is to
provide immediate access to all values; therefore it also needs to
resolve aliases.
> 2) Attribute-information elements: These are when there is no string as
> the value, but some data in XML attributes. These are:
> ...
> e) <minDays>: a number from 1 to 7.
IMO it's the cooker's job to convert these from string to integer, so
that the runtime routines can use the value quickly.
Bruno
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]