Login  Register

Re: Re: XForms W3C suite and XPath Functions in Orbeon

Posted by Erik Bruchez-3 on Jan 21, 2010; 6:23pm
URL: https://discuss.orbeon.com/XForms-W3C-suite-and-XPath-Functions-in-Orbeon-tp1012497p1050013.html

Nick,

No problem at all! That's what code reviews are for ;)

-Erik

On Sat, Jan 16, 2010 at 2:35 AM, nvdbleek <[hidden email]> wrote:

>
> Erik,
>
> Sorry about this, I will try to be more careful with the fixes I'll do this
> weekend. Don't know why I made those stupid mistakes, but that's almost
> always with mistakes/bugs... I will for sure now always copy the XForms W3C
> test cases to test the feature I changed. (but this won't cause the return
> type issues, but that will never happen again)
>
> Regards,
>
> Nick
>
>
>
> Erik Bruchez-3 wrote:
>>
>> I found a bug: local-date-time() should be local-dateTime(). I fixed this.
>>
>> Also, I notice that our boolean-from-string() function was declared to
>> return a string type, not a boolean type. The same went for the new
>> is-card-number(). I fixed this as well.
>>
>> I also reordered function declarations in the Java code to follow spec
>> order.
>>
>> Commit:
>>
>> http://github.com/orbeon/orbeon-forms/commit/35c3acee2f391c6e4e9ba98ad20f51b26fca9204
>>
>> Finally I moved some documentation to the wiki:
>>
>> http://wiki.orbeon.com/forms/doc/developer-guide/xforms-xpath-functions
>>
>> -Erik
>>
>> On Fri, Jan 15, 2010 at 10:12 AM, Erik Bruchez <[hidden email]> wrote:
>>> Hi Nick,
>>>
>>> Excellent! I just merged the new functions into the master branch.
>>>
>>> Changes to seconds-to-dateTime():
>>>
>>> The change to the parameter seems fairly safe.
>>>
>>> On the other hand, our implementation of the function returns an
>>> xs:dateTime, so I don't think it is reasonable that the function can
>>> also return an empty string if the parameter is NaN. I would rather
>>> return an empty sequence. Basically what I don't like is that the
>>> function can return different types depending on the parameter.
>>> Hopefully changing to an empty sequence doesn't cause a problem with
>>> the test suite? The alternative is to always return a string as per
>>> XForms 1.1, but this is less in line with XPath 2.0.
>>>
>>> Changes to seconds-from-dateTime():
>>>
>>> I guess those changes are right as per the spec. But a double return
>>> value doesn't make much sense with XPath 2.0! So I am torn on this
>>> one.
>>>
>>> WDYT?
>>>
>>> -Erik
>>>
>>> On Tue, Jan 12, 2010 at 1:20 PM, nvdbleek <[hidden email]> wrote:
>>>>
>>>> Hi Erik,  Alessandro, and others,
>>>>
>>>> As you probably already know, I'm working on a test harness for the
>>>> XForms
>>>> 1.1 test suite. I reworked almost everything compared to what I had at
>>>> the
>>>> last XForms WG FtF meeting. The tests now run directly from within the
>>>> browser. But the main difference is that they are now written in a
>>>> simple
>>>> XML format. Currently I've written the tests for Chapter 2 and 7. You
>>>> can
>>>> find the source at http://github.com/nvdbleek/com.orbeon.testsuite.w3c
>>>> if
>>>> you want to check it out. Please read the Readme.txt to get you up to
>>>> speed
>>>> (in fact you have to execute only one ant target). Any comments are
>>>> welcome.
>>>>
>>>> I added some missing XPath funtions to Orbeon see
>>>> http://github.com/nvdbleek/orbeon-forms
>>>>
>>>> I also made changes to seconds-from-dateTime() and seconds-to-dateTime()
>>>> which I want your opinion about before merging them to my master branch
>>>> of
>>>> Orbeon (they are currently on
>>>> http://github.com/nvdbleek/orbeon-forms/commits/xpath_functions_fixes).
>>>>
>>>> The changes I made are:
>>>> 1) seconds-from-dateTime(): changed the return type from integer to
>>>> double
>>>> (to pass test in testsuite)
>>>> http://github.com/nvdbleek/orbeon-forms/commit/1af695f7ee7b933611bc7ed0aff6cf20e64542a5
>>>>
>>>> 2) seconds-to-dateTime(): changed argument type to NUMBER_TYPE ->
>>>> seconds-to-dateTime((number('NaN')) now returns empty string as
>>>> specified in
>>>> the XForms spec
>>>> http://github.com/nvdbleek/orbeon-forms/commit/9e35d27bc174bfb59993902b326b10d2dfbeee80
>>>>
>>>> Could you please give your opinion about these two fixes? I will then
>>>> incorporate your remarks and merge them afterwards to my master.
>>>>
>>>> Thanks in Advance,
>>>>
>>>> Nick Van den Bleeken
>>>> R&D Manager
>>>>
>>>> Phone: +32 3 821 01 70
>>>> Office Fax: +32 3 821 01 71
>>>> [hidden email]
>>>> http://www.inventivedesigners.com
>>>>
>>>> --
>>>> View this message in context:
>>>> http://n4.nabble.com/XForms-W3C-suite-and-XPath-Functions-in-Orbeon-tp1012497p1012497.html
>>>> 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
>>>> OW2 mailing lists service home page: http://www.ow2.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
>> OW2 mailing lists service home page: http://www.ow2.org/wws
>>
>>
>
> --
> View this message in context: http://n4.nabble.com/XForms-W3C-suite-and-XPath-Functions-in-Orbeon-tp1012497p1015555.html
> 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
> OW2 mailing lists service home page: http://www.ow2.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
OW2 mailing lists service home page: http://www.ow2.org/wws