Date formatting diff between @ref and @value

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Date formatting diff between @ref and @value

ToddG
I noticed that when rendering a xs:date() element with <xforms:output @ref=","/> versus <xformat:output @value="."/> the @ref formats the ISO date into a local date format whereas the @value does not.  Erik tells me this is by design and that I need to format the @value version myself.  So I looked up the doc regarding formatting and found this example which I plugged into my XFORMS-TODO example:

<xforms:output ref="when" xxforms:format ="format-date(xs:date(.), '[MNn] [D], [Y]', 'en', (), ())"/>

This produces the error: 'Control is no longer bound to a node. Cannot evaluate control display value."
 
I tried this variation:
 
<xforms:output value="when" xxforms:format ="format-date(xs:date(when), '[MNn] [D], [Y]', 'en', (), ())"/>
 
and it output the ISO date without formatting.


--
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
Reply | Threaded
Open this post in threaded view
|

Re: Date formatting diff between @ref and @value

Adrian Baker
Hmm, that error seems to be similar to the one mentioned here: http://mail-archive.objectweb.org/ops-users/2006-09/msg00228.html

How about:

    <xforms:output value="format-date(xs:date(when), '[MNn] [D], [Y]', 'en', (), ())"/>

Adrian


Todd Gochenour wrote:
I noticed that when rendering a xs:date() element with <xforms:output @ref=","/> versus <xformat:output @value="."/> the @ref formats the ISO date into a local date format whereas the @value does not.  Erik tells me this is by design and that I need to format the @value version myself.  So I looked up the doc regarding formatting and found this example which I plugged into my XFORMS-TODO example:

<xforms:output ref="when" xxforms:format ="format-date(xs:date(.), '[MNn] [D], [Y]', 'en', (), ())"/>

This produces the error: 'Control is no longer bound to a node. Cannot evaluate control display value."
 
I tried this variation:
 
<xforms:output value="when" xxforms:format ="format-date(xs:date(when), '[MNn] [D], [Y]', 'en', (), ())"/>
 
and it output the ISO date without formatting.

-- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: [hidden email] For general help: [hidden email] ObjectWeb mailing lists service home page: http://www.objectweb.org/wws


--
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
Reply | Threaded
Open this post in threaded view
|

Re: Date formatting diff between @ref and @value

ToddG
Yep, that does it.  Thanks.

On 11/14/06, Adrian Baker <[hidden email]> wrote:
Hmm, that error seems to be similar to the one mentioned here: <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://mail-archive.objectweb.org/ops-users/2006-09/msg00228.html" target="_blank"> http://mail-archive.objectweb.org/ops-users/2006-09/msg00228.html

How about:

    <xforms:output value="format-date(xs:date(when), '[MNn] [D], [Y]', 'en', (), ())"/>

Adrian


Todd Gochenour wrote:
I noticed that when rendering a xs:date() element with <xforms:output @ref=","/> versus <xformat:output @value="."/> the @ref formats the ISO date into a local date format whereas the @value does not.  Erik tells me this is by design and that I need to format the @value version myself.  So I looked up the doc regarding formatting and found this example which I plugged into my XFORMS-TODO example:

<xforms:output ref="when" xxforms:format ="format-date(xs:date(.), '[MNn] [D], [Y]', 'en', (), ())"/>

This produces the error: 'Control is no longer bound to a node. Cannot evaluate control display value."
 
I tried this variation:
 
<xforms:output value="when" xxforms:format ="format-date(xs:date(when), '[MNn] [D], [Y]', 'en', (), ())"/>
 
and it output the ISO date without formatting.

-- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: [hidden email] For general help: [hidden email] ObjectWeb mailing lists service home page: <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.objectweb.org/wws" target="_blank">http://www.objectweb.org/wws


--
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: <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.objectweb.org/wws" target="_blank">http://www.objectweb.org/wws





--
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