Re: [Xsltforms-support] Date on the database and on the browser
Brought to you by:
alain-couthures
From: Elias M. <eli...@gm...> - 2013-04-08 01:12:21
|
Hi Alain. The data types are defined as xsd:date and the date picker shows fine. I know the format of the date that shows in the browser is controlled by the local language config file (in my case config_en_us.xsl). All works fine and the date is written as YYYY-MM-DD in the XML. My problem is that the schema I'm using to validate the XML generated expects the date in the format "YYYYMMDD". I tried to modify config.xsl but it did not work. I need to be able to tell XSLTForms to write the date in the YYYYMMDD format, not the default YYYY-MM-DD. Thanks. Elias On Sun, Apr 7, 2013 at 2:14 PM, Alain Couthures < ala...@ag...> wrote: > Hello Elias, > > There are clearly may ways to serialize a date, not only as a string but > also as a number (number of time units since a specific date). > > The date picker in XSLTForms is rendered for the xsd:date type but, to > render it for other data types, it should be associated to a parent of it > (to be defined). Then, new date types could be defined with a regular > expression having named capture for parsing/serializing. > > All of this is not yet implemented (but should not require too much > work...) and using XSLT 1.0 stylesheets before/after submission is > currently the unique possibility. > > What do you think? > > -Alain > > Le 05/04/2013 18:32, Elias Mazur a écrit : > > >> Hi. >> >> I need to have the XForms display the date as "MM/dd/yyyy" but need to >> have it written to the XML as "yyyyMMdd". I know of the format.date on the >> config.xsl, but how can I configure to have it so the value displayed is >> MMdd/yyyy and the internal value that is held in the instance is "yyyyMMdd" >> >> Thanks. >> Elias >> >> > |