logo       
Google Custom Search
    AddThis Social Bookmark Button

Re: line breaks and date format: msg#00002

Subject: Re: line breaks and date format
Hi,

    we realize that full Chiba support for localization of display data for 
various types will need to be tied to the whole schema-support issue.  In 
addition, it will have to be a rich model, involving not just display 
attributes, but timezone and locale.

In the shorter term, we are trying to implement a simple approach to a small 
subset of this, mainly the one discussed in this email -- using 1 or 2 
alternate date input formats.  For simplicity's sake, we would would probably 
not worry about timezone issues, and restrict ourself to a couple of Gregorian 
date-only date formats that could be easily converted by XSLT.  As such, we are 
looking for an approach that is simple, stays away from making core Chiba 
changes, and therefore will not conflict with future work in Chiba to support 
full localization.

I wanted to suggest the approach we are going to try to solve the simple 
date-formatting problem, and see if anyone has tried something similar or has 
any feedback.

We believe the Chiba XSLT, possibly in conjunction with 
org.chiba.adapter.web.WebAdapter.getExternalName() method, could do two things:
- associate a parameter name to the required date format -- either by saving 
the association or encoding the association in the HTML form parameters
- convert the internal Chiba date data to the appropriate format in the HTML

The WebAdapter, upon receiving the HTTP submission parameters, before calling 
control.setValue(), would recognize the parameter's associated format and 
reverse the date transformation when the parameter is unpacked in the 
handleData() method.

I have no doubt we can quickly make this work.  I just want to make sure that 
we are not overlooking some significant drawback that would preclude this 
approach even to the simple short-term formatting we have in mind.

PS. The last time I did a Japanese system we had to use the Japanese Imperial 
format < http://www.i18nguy.com/l10n/emperor-date.html >, an example of what I 
wouldn't attempt using this approach.  :-)

Thanks,
Paul Miniato

joern turner & Flavio Costa wrote:

>>>> 2) We are used to type a date format other than XML Schema's one
>>>> (yyyy-mm-dd). It would be important for us if Chiba allows 
>>>> us to specify
>>>> (in its configuration file) a custom format to be displayed to the
>>>> end-user, and convert it to Schema's format just for 
>>>> validation and when
>>>> finally submitting instance data.
>>>sure, i think nobodys used to input dates in schema format 
>>> ;) and so
>>>your requirement is a quite common one. as an open source 
>>> project we're
>>>lacking financial support and so i can't make promises 
>>> when we'll have
>>>addressed this issue. its planned to refactor the schema 
>>> datatypes part
>>>in Chiba and we'll take your issue into account then.
>>     Incidentally this date format is often used in Japan, 
>> but evidently
>> Schema's time and datetime formats are more akward. 
>> Unfortunatelly I
>> don't know enough of Chiba's inner workings, therefore I cannot
>> volunteer to help on it yet.
>  we'll definitely think about this issue and where to 
> integrate it into 
>  Chiba. i already have a rough idea - whenever a refresh() is 
> executed 
>  Chiba updates its UI objects to reflect the status of the 
> instance-data. 
>  cause the data values are copied to the controls the 
> update() method of 
>  XFormsElement might be the right place.
>  the other direction might work quite the same. - have to 
> look into it ...
>  but you raised a definitely very important issue that also 
> touched i18n 
>  and localization of datatype representations

Paul Miniato
ProLender Project
604-734-2511




-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id56&alloc_id438&op=click



Try Searching:
servers, voip, java, networking, microsoft ...
<Prev in Thread] Current Thread [Next in Thread>