You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by christian bindeballe <ot...@gmail.com> on 2006/01/09 17:39:41 UTC
form datatype locale formatting
hello,
I would appreciate any hints as to how to enhance this form definition
file. right now it reads the date from a file where it is formatted
01/09/06 (as for january the 9th 2006) and displays it as 09.01.06
the widget definiton file reads likes this (excerpt)
<fd:datatype base="date">
<fd:convertor>
<fd:patterns>
<fd:pattern locale="de-DE">dd.MM.yyyy</fd:pattern>
</fd:patterns>
</fd:convertor>
</fd:datatype>
I would like to have it formatted in the form as 09.01.2006, how do I
accomplish that? this concerns only the way the date is displayed in the
form. the data can later be written to the file as 01/09/06.
when displaying the file using xslt I would like it to be shown as
09.01.2006 again... difficult?
best regards,
christian
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: form datatype locale formatting
Posted by Sylvain Wallez <sy...@apache.org>.
christian bindeballe wrote:
> hello,
>
> I would appreciate any hints as to how to enhance this form definition
> file. right now it reads the date from a file where it is formatted
> 01/09/06 (as for january the 9th 2006) and displays it as 09.01.06
>
> the widget definiton file reads likes this (excerpt)
>
> <fd:datatype base="date">
> <fd:convertor>
> <fd:patterns>
> <fd:pattern locale="de-DE">dd.MM.yyyy</fd:pattern>
> </fd:patterns>
> </fd:convertor>
> </fd:datatype>
>
> I would like to have it formatted in the form as 09.01.2006, how do I
> accomplish that? this concerns only the way the date is displayed in
> the form. the data can later be written to the file as 01/09/06.
>
> when displaying the file using xslt I would like it to be shown as
> 09.01.2006 again... difficult?
You can (and should) specify different formats in the definition file
and in the template file. This is probably what you're looking for.
Sylvain
--
Sylvain Wallez Anyware Technologies
http://bluxte.net http://www.anyware-tech.com
Apache Software Foundation Member Research & Technology Director
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org