XForms W3C suite and XPath Functions in Orbeon

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

XForms W3C suite and XPath Functions in Orbeon

nvdbleek
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
nick@bleeken.eu
http://www.inventivedesigners.com
Reply | Threaded
Open this post in threaded view
|

Re: XForms W3C suite and XPath Functions in Orbeon

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

Re: XForms W3C suite and XPath Functions in Orbeon

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

Re: XForms W3C suite and XPath Functions in Orbeon

nvdbleek
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 <ebruchez@gmail.com> 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 <nick@bleeken.eu> 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
>> nick@bleeken.eu
>> 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 ops-users@ow2.org mailing list.
>> To unsubscribe: mailto:ops-users-unsubscribe@ow2.org
>> For general help: mailto:sympa@ow2.org?subject=help
>> OW2 mailing lists service home page: http://www.ow2.org/wws
>>
>>
>


--
You receive this message as a subscriber of the ops-users@ow2.org mailing list.
To unsubscribe: mailto:ops-users-unsubscribe@ow2.org
For general help: mailto:sympa@ow2.org?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: [ops-users] XForms W3C suite and XPath Functions in Orbeon

nvdbleek
In reply to this post by Erik Bruchez-3
Hi Erik,

> 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():

You're correct that makes much more sense in XPath 2.0 and doesn't
breaks the test case. I've changed it to an empty sequence, and merged
it to my master branch
(http://github.com/nvdbleek/orbeon-forms/commit/7afab1ac32c5aa1b98a2b73366cc4cab6114807e).

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

I always thought seconds-from-dateTime returned an integer when the
input was valid, but the test suite has a case that tests with
'1970-01-01T00:00:00.001Z, and expects 0.001. I'm not sure why you
would ever need the fractional part in a form, and you can run into
rounding errors... Maybe we should bring this to the WG groups
attention (I was to focussed on making the test suite tests working).
Do you think it is worth sending an e-mail to the WG list?

>
> -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 message @
> http://n4.nabble.com/XForms-W3C-suite-and-XPath-Functions-in-Orbeon-tp1012497p1015129.html
> To unsubscribe from XForms W3C suite and XPath Functions in Orbeon, click
> here.
>



--
Regards,

Nick Van den Bleeken
Reply | Threaded
Open this post in threaded view
|

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

Erik Bruchez-3
In reply to this post by nvdbleek
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
Reply | Threaded
Open this post in threaded view
|

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

Erik Bruchez
Administrator
In reply to this post by nvdbleek
> You're correct that makes much more sense in XPath 2.0 and doesn't
> breaks the test case. I've changed it to an empty sequence, and merged
> it to my master branch
> (http://github.com/nvdbleek/orbeon-forms/commit/7afab1ac32c5aa1b98a2b73366cc4cab6114807e).

Cool I merged that in, as well as your change for the optional
digest() parameter.

> I always thought seconds-from-dateTime returned an integer when the
> input was valid, but the test suite has a case that tests with
> '1970-01-01T00:00:00.001Z, and expects 0.001. I'm not sure why you
> would ever need the fractional part in a form, and you can run into
> rounding errors... Maybe we should bring this to the WG groups
> attention (I was to focussed on making the test suite tests working).
> Do you think it is worth sending an e-mail to the WG list?

I guess one question for the group is whether for
seconds-from-dateTime(), the types should be different when using
XPath 1.0 vs. 2.0 instead of just mapping exactly to the closest XPath
1.0 type.

In the work you have done here:

http://www.w3.org/MarkUp/Forms/wiki/XPath_2.0

the function are defined as:

xs:integer seconds-from-dateTime(xs:string)
xs:string seconds-to-dateTime(numeric)

I suppose that an XPath 2.0 signature would look more like:

xs:decimal seconds-from-dateTime(xs:dateTime)
xs:dateTime seconds-to-dateTime(xs:numeric)

Since we introduce an XPath version number specified so that the
XForms engine can put itself in XPath 1.0 compatibility mode, we could
say that XForms functions return types matching the XForms 1.1 types
if xpath-version="1.0". Otherwise, the XPath 2.0-compatible signatures
are used. Migrating an XPath 1.0 form to XPath 2.0 will likely require
some changes to a form anyway.

Bottom line is that yes, this would be best discussed by the XForms
working group. Do you want to send an email with some of what we
discussed above? Feel free to copy/paste if needed.

-Erik


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

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

nvdbleek
Hi Erik,

Thank you for merging in my changes so quickly (this definitely
stimulates me to do more fixes ;), I will try to work a bit on
Orbeon/test framework tomorrow evening).

I will send an e-mail explaining the options for seconds-from-dateTime
and seconds-to-dateTime to the WG mailing list.

On Thu, Jan 21, 2010 at 20:45, Erik Bruchez [via Orbeon Forms
(ops-users)] <[hidden email]> wrote:

>> You're correct that makes much more sense in XPath 2.0 and doesn't
>> breaks the test case. I've changed it to an empty sequence, and merged
>> it to my master branch
>>
>> (http://github.com/nvdbleek/orbeon-forms/commit/7afab1ac32c5aa1b98a2b73366cc4cab6114807e).
>
> Cool I merged that in, as well as your change for the optional
> digest() parameter.
>
>> I always thought seconds-from-dateTime returned an integer when the
>> input was valid, but the test suite has a case that tests with
>> '1970-01-01T00:00:00.001Z, and expects 0.001. I'm not sure why you
>> would ever need the fractional part in a form, and you can run into
>> rounding errors... Maybe we should bring this to the WG groups
>> attention (I was to focussed on making the test suite tests working).
>> Do you think it is worth sending an e-mail to the WG list?
>
> I guess one question for the group is whether for
> seconds-from-dateTime(), the types should be different when using
> XPath 1.0 vs. 2.0 instead of just mapping exactly to the closest XPath
> 1.0 type.
>
> In the work you have done here:
>
> http://www.w3.org/MarkUp/Forms/wiki/XPath_2.0
>
> the function are defined as:
>
> xs:integer seconds-from-dateTime(xs:string)
> xs:string seconds-to-dateTime(numeric)
>
> I suppose that an XPath 2.0 signature would look more like:
>
> xs:decimal seconds-from-dateTime(xs:dateTime)
> xs:dateTime seconds-to-dateTime(xs:numeric)
>
> Since we introduce an XPath version number specified so that the
> XForms engine can put itself in XPath 1.0 compatibility mode, we could
> say that XForms functions return types matching the XForms 1.1 types
> if xpath-version="1.0". Otherwise, the XPath 2.0-compatible signatures
> are used. Migrating an XPath 1.0 form to XPath 2.0 will likely require
> some changes to a form anyway.
>
> Bottom line is that yes, this would be best discussed by the XForms
> working group. Do you want to send an email with some of what we
> discussed above? Feel free to copy/paste if needed.
>
> -Erik
>
>
> --
> 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 message @
> http://n4.nabble.com/XForms-W3C-suite-and-XPath-Functions-in-Orbeon-tp1012497p1053815.html
> To start a new topic under ObjectWeb OPS - Users, email
> [hidden email]
> To unsubscribe from ObjectWeb OPS - Users, click here.
>



--
Regards,

Nick Van den Bleeken
Reply | Threaded
Open this post in threaded view
|

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

Erik Bruchez
Administrator
Excellent, looking forward to more changes!

-Erik

On Thu, Jan 21, 2010 at 1:03 PM, nvdbleek <[hidden email]> wrote:

> Hi Erik,
>
> Thank you for merging in my changes so quickly (this definitely
> stimulates me to do more fixes ;), I will try to work a bit on
> Orbeon/test framework tomorrow evening).
>
> I will send an e-mail explaining the options for seconds-from-dateTime
> and seconds-to-dateTime to the WG mailing list.
>
> On Thu, Jan 21, 2010 at 20:45, Erik Bruchez [via Orbeon Forms
> (ops-users)] <[hidden email]> wrote:
>>> You're correct that makes much more sense in XPath 2.0 and doesn't
>>> breaks the test case. I've changed it to an empty sequence, and merged
>>> it to my master branch
>>>
>>>
>>> (http://github.com/nvdbleek/orbeon-forms/commit/7afab1ac32c5aa1b98a2b73366cc4cab6114807e).
>>
>> Cool I merged that in, as well as your change for the optional
>> digest() parameter.
>>
>>> I always thought seconds-from-dateTime returned an integer when the
>>> input was valid, but the test suite has a case that tests with
>>> '1970-01-01T00:00:00.001Z, and expects 0.001. I'm not sure why you
>>> would ever need the fractional part in a form, and you can run into
>>> rounding errors... Maybe we should bring this to the WG groups
>>> attention (I was to focussed on making the test suite tests working).
>>> Do you think it is worth sending an e-mail to the WG list?
>>
>> I guess one question for the group is whether for
>> seconds-from-dateTime(), the types should be different when using
>> XPath 1.0 vs. 2.0 instead of just mapping exactly to the closest XPath
>> 1.0 type.
>>
>> In the work you have done here:
>>
>> http://www.w3.org/MarkUp/Forms/wiki/XPath_2.0
>>
>> the function are defined as:
>>
>> xs:integer seconds-from-dateTime(xs:string)
>> xs:string seconds-to-dateTime(numeric)
>>
>> I suppose that an XPath 2.0 signature would look more like:
>>
>> xs:decimal seconds-from-dateTime(xs:dateTime)
>> xs:dateTime seconds-to-dateTime(xs:numeric)
>>
>> Since we introduce an XPath version number specified so that the
>> XForms engine can put itself in XPath 1.0 compatibility mode, we could
>> say that XForms functions return types matching the XForms 1.1 types
>> if xpath-version="1.0". Otherwise, the XPath 2.0-compatible signatures
>> are used. Migrating an XPath 1.0 form to XPath 2.0 will likely require
>> some changes to a form anyway.
>>
>> Bottom line is that yes, this would be best discussed by the XForms
>> working group. Do you want to send an email with some of what we
>> discussed above? Feel free to copy/paste if needed.
>>
>> -Erik
>>
>>
>> --
>> 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 message @
>>
>> http://n4.nabble.com/XForms-W3C-suite-and-XPath-Functions-in-Orbeon-tp1012497p1053815.html
>> To start a new topic under ObjectWeb OPS - Users, email
>> [hidden email]
>> To unsubscribe from ObjectWeb OPS - Users, click here.
>>
>
>
> --
> Regards,
>
> Nick Van den Bleeken
>
> ________________________________
> View this message in context: Re: Re: XForms W3C suite and XPath Functions
> in Orbeon
> 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