Re: [xslt] Patch to implement date:sum(node-set)
- From: "William M. Brack" <wbrack mmm com hk>
- To: "The Gnome XSLT library mailing-list" <xslt gnome org>
- Subject: Re: [xslt] Patch to implement date:sum(node-set)
- Date: Fri, 24 Sep 2004 23:54:09 +0800 (HKT)
Daniel Veillard said:
> On Wed, Sep 22, 2004 at 02:59:51PM +0200, Derek Poon wrote:
>> LibXSLT developers (esp. Daniel Veillard and Charles Bozeman),
>>
>> This patch to libxslt 1.1.5 implements the date:sum function as
>> specified in http://exslt.org/date/functions/sum/
>> Please provide feedback, or apply it to the source.
>
> Hum ... I tried ... and hit the fact that there is already
> a date sum function provided in recent versions.
> http://cvs.gnome.org/viewcvs/libxslt/libexslt/date.c?rev=1.30&view=auto
> The version in CVs obviously got more testing since it was added in
> 1.1.9 last month (EXSLT date:sum added (Joel Reed))
> http://xmlsoft.org/XSLT/news.html
> So I think I will keep the existing implementation, which seems
> to work just as well except it generate one difference when running
> the regression tests:
>
> paphio:~/XSLT/tests/exslt/date -> ../../../xsltproc/xsltproc sum.2.xsl
> sum.2.xmlxmlXPathCompiledEval: evaluation failed
> runtime error: file sum.2.xsl line 12 element value-of
> xsltValueOf: text copy failed
> xmlXPathCompiledEval: evaluation failed
<snip>
>
> I'm of course adding your regression tests to the suite :-)
>
> Daniel
I checked over the existing code and found a couple of "areas for enhancement"
(this is Bill-code for "fixed some bugs") within the date:sum routine. The
problem involved empty sets and/or empty strings, plus a some potential leaks.
With those changes the regression test runs okay. The fixed code will be in
CVS soon.
Bill
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]