Using xs:date to use date controls on my form, however the client expects Ymd in their XML, and the xs:date enforces Y-m-d. I can see from other threads there is no way to change this as this is an ISO format, however surely it is up to the developer of the form to state the format the control supplies?
If there is really no way to change the format, how can I pass the formatted date into the xml instance? |
Chris,
One of the tricks you can do that I've seen mentioned in other threads is have a second instance that can hold your date information. Bind your controls to that second instance, and then have another bind doing a calculate from the second instance, formatting the date the way the customer/schema requires and storing it in your original instance. It's kinda hacky, but should do the trick. On 6/6/07, ChrisSpeare <[hidden email]> wrote: > > Using xs:date to use date controls on my form, however the client expects Ymd > in their XML, and the xs:date enforces Y-m-d. I can see from other threads > there is no way to change this as this is an ISO format, however surely it > is up to the developer of the form to state the format the control supplies? > > If there is really no way to change the format, how can I pass the formatted > date into the xml instance? > -- > View this message in context: http://www.nabble.com/xs%3Adate-formatting-tf3876473.html#a10984200 > Sent from the ObjectWeb OPS - Users mailing list archive at Nabble.com. > > > > > -- > You receive this message as a subscriber of the [hidden email] mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > ObjectWeb mailing lists service home page: http://www.objectweb.org/wws > > -- Daniel E. Renfer http://kronkltd.net/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Administrator
|
In reply to this post by ChrisSpeare
Chris,
In XML documents, a date in 99% of the cases follows the XML Schema datatypes format, which is an ISO date. It is unfortunate to even see other date formats around if you ask me :-( What you could do to work around the problem would be to pre- and post-process your document to perform date conversions, or store the xs:date in a separate instance and then copy them to your final instance with a calculation. -Erik ChrisSpeare wrote: > Using xs:date to use date controls on my form, however the client expects Ymd > in their XML, and the xs:date enforces Y-m-d. I can see from other threads > there is no way to change this as this is an ISO format, however surely it > is up to the developer of the form to state the format the control supplies? > > If there is really no way to change the format, how can I pass the formatted > date into the xml instance? > -- Orbeon Forms - Web Forms for the Enterprise Done the Right Way http://www.orbeon.com/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Free forum by Nabble | Edit this page |