Re: data types and inheritance



On Tue, 2005-08-16 at 17:38 +0200, Bruno Haible wrote:
> Roozbeh Pournader wrote:
> I think this entire inheritance and alias resolution should be done
> during the transformation from XML format to binary mmapable format

Enough reasons to do that, yes.

I see only one problem: what should happen for user configuration?

I used to assume that a user configuration file should be something that
gets added at the end of the "locale chain" as the inheritance is
concerned. So, it would work as if the user is running under the the
locale "fa_IR_CUSTOM". This may require the whole XML set when one (say,
a web application) encounters some small code (which may contain
aliases, etc) passed to it from the client application.

But since the LDML spec doesn't say much about customizations, I assume
we could limit the way a user customization file acts. We may want to
restrict the format in a way that it does not allow any kind of alias or
interitance, top-down or sideways. It should only mention one source
locale and then specify changes.

So, under this restrictions, if a user wants to change something for the
gregorian calendar (which gets copied to other calendars unless
something else is specified for them) and have that copied to the other
calendars also, her customization file should include copies of that
data for each and every calendar she wants the format string changed
for.

This helps avoiding extra cooking time, and possibly will help save
memory by keeping only small binary diffs for users, so if there are two
users both using a minimally customized fa_IR, there will be one large
chunk of data for fa_IR and two small chunk for diffs for these two
users.

> (which I'll call "cooking").

Nice term. I believe we should use that from now on.

But I guess the cooker should also be able to create an expanded XML
file (with all inheritance, alises, and default attribute values
expanded), something that would result essentially in the same cooked
file but without reading any extra file, in case the user wants to pass
her whole settings around to someone else, like a web application.

roozbeh





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