Version française
Home     About     Download     Resources     Contact us    
Browse thread
ANN: XmlRpc-Light 0.4 - Now a server too
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Dave Benjamin <dave@r...>
Subject: Re: [Caml-list] ANN: XmlRpc-Light 0.4 - Now a server too
Richard Jones wrote:
> On Sun, Jul 29, 2007 at 10:51:17AM -0700, Dave Benjamin wrote:
>>   - The default date-time functions use the format 
>> "20070729T10:42:00-07:00". This seems to be the most common 
>> interpretation of ISO 8601 used in XML-RPC servers. You can override 
>> this behavior by calling the "set_datetime_encode" or 
>> "set_datetime_decode" methods on the client or server.
> 
> You might want to take a look at Julien Signoles' Calendar library for
> date/time types and handling:
> 
> http://www.lri.fr/~signoles/prog/calendar/

I have this library installed, and indeed considered using it when I 
began writing the date-time support. I would likely have used it, if 
only it had the ability to parse strings.

I really wish Winer had considered alternatives to ISO 8601--say, UTC 
epoch seconds--in the design of XML-RPC, because it's barely a standard 
at all! There are so many variations and options that writing a parser 
for it borders on natural language processing. Even the W3C suggestion, 
which restricts ISO 8601 to a very small subset, doesn't help here since 
it still conflicts with the common usage in XML-RPC, with hyphens 
omitted between the date values. I decided to err on the side of 
oversimplification, and support only the most common format, leaving in 
hooks for users to customize the behavior as required.

There is still benefit, of course, in using a standard date-time type. I 
only wonder if it is worth adding another library dependency; I am 
trying hard to keep the list small (currently only Xml-Light and 
Ocamlnet, which in turn requires PCRE). I think it would be great if a 
date-time type were made part of the official OCaml distribution.

My only qualm with the Calendar library is that I feel a bit 
uncomfortable with a top-level module called "Printer" that is for the 
specific purpose of date formatting. I would assume that a module by 
that name were for communicating with "lpt", if anything. But hey, 
what's in a name, anyway... =)

Thanks for the advice. I will consider it.

Cheers,
Dave