You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by "Stewart, Gary" <Ga...@luht.scot.nhs.uk> on 2006/02/10 12:10:37 UTC

More Questions About Date

Sorry to bother people I'm still getting up to speed with all this.

I've been trying to use CForms with an existing application and I've got stuck in a few areas. I'm using the XML Binding stuff to create an XML document to be sent to another server. The first problem I've come across is that I have an XML document returned in the format

<blah>
 <bar xsi:nil="true" />
 <foo>Hi there!</foo>
</blah>

where bar is a date type. As it is empty it fails. Is there a way to make the binding accept an empty value? 

I then figured I can strip any nil values from the document leaving just the filled in values left. However the output document looks something like:

<blah>
 <foo>Hi there!</foo>
 <bar>Fri Jan 12 00:03:00 GMT 1973</bar>
</blah>

with the two issues that:

1, The bound "bar" now is the last element which might be a problem with some schema. This wouldn't be a problem if there is a solution to the problem above though.
2, The format is a long datetime format. Is there a way of just getting the ISO date type? At the moment I'm just returning the DOM tree as it is in JXPath so presumably that's the Java localisation. I looked at the datatype documentation but couldn't find a way of doing a conversion on the submit.

Help with any of these would be most appreciated.

Many thanks,

Gary




*****************************************************************
The information contained in this message may be confidential or 
legally privileged and is intended for the addressee only, If you 
have received this message in error or there are any problems, 
please notify the originator immediately. The unauthorised use, 
disclosure, copying or alteration of this message is 
strictly forbidden.
*****************************************************************


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org