Re: [Xsltforms-support] Cancelling loop/action

2021-02-14 Thread Josselin Morvan
Hi Alain, My apologies, I tried your solution quickly yesterday afternoon when I saw your answer, but I didn’t think to empty my browser's cache. It works perfectly now, thank you very much for your advices with Steven, it helped me a lot! Best, Josselin. > Le 14 févr. 2021 à 09:30, Alain C

Re: [Xsltforms-support] Cancelling loop/action

2021-02-13 Thread Josselin Morvan
Hi Alain, Thank you very much for your feedback. I tried what you suggest, unfortunately, if it works perfectly with XSLTForms 1.3, it doesn’t with XSLTForms 1.5.3, the last submission is still activated twice with this release. Thanks for your help, Best, Josselin. > Le 13 févr. 2021 à 17

Re: [Xsltforms-support] Cancelling loop/action

2021-02-13 Thread Alain Couthures
Hi Josselin, In this test case, an event is defined so two submissions are to be sent synchronously, one after one, according to a condition which should be true for one only. The first one will send again the same event producing a submission loop effect. But the fir

Re: [Xsltforms-support] Cancelling loop/action

2021-02-06 Thread Josselin Morvan
Hi Steven, Hi Alain, I made a short and simple sample to show you how my form works, what it does, and the error I get with the submission. Because I run it with BaseX, I added a little Xquery script that creates the db and allows the saving of the submissions. If you want to use it, just put

Re: [Xsltforms-support] Cancelling loop/action

2021-02-05 Thread Josselin Morvan
That was the error message I had 2 years ago “submission-in-progress“, and then I switched to my "while loop" and modified my submission routine to avoid this issue. I also checked my message element and it seems to be in the good place, in my I have : error: error-type:

Re: [Xsltforms-support] Cancelling loop/action

2021-02-05 Thread Steven Pemberton
On Thursday 04 February 2021 15:34:27 (+01:00), Josselin Morvan wrote: Hi Steven, Thank you very much for your answer. I don't know why I didn’t think of it before, as I use this method with another form… but not for a loop. It’s simple and efficient! Just for my personal understanding,

Re: [Xsltforms-support] Cancelling loop/action

2021-02-05 Thread Steven Pemberton
I added a test case to the XForms test suite to test for this case, and indeed XSLTForms incorrectly returns "submission-in-progress" if you do a in the handler for submit-done (apparently you put the message element in the wrong place). Steven On Thursday 04 February 2021 23:42:37 (+01:00),

Re: [Xsltforms-support] Cancelling loop/action

2021-02-05 Thread Steven Pemberton
Although submissions are by default asynchronous, a submission element may only be activated once at a time. I'm surprised that all the event values are empty; they really shouldn't be for an xforms-submit-error event. There is a difference in semantics between a dispatch with and without a del

Re: [Xsltforms-support] Cancelling loop/action

2021-02-04 Thread Josselin Morvan
Hi Steven, Thank you for your quick response. Unfortunately, all the error events are empty. So, I tried your method with the dispatch element. At first it didn’t work either, then I added a delay to the dispatch and… it works! As I said, when the submission is done, I update my instance with t

Re: [Xsltforms-support] Cancelling loop/action

2021-02-04 Thread Steven Pemberton
What error do you get? Hint, use: Submission error. error-type: error-message: response-status-code: response-reason-phrase: resource-uri:

Re: [Xsltforms-support] Cancelling loop/action

2021-02-04 Thread Josselin Morvan
Hi Steven, hi all, Unfortunately, when I use the last method (submission/action[@ev:event="xforms-submit-done"]/send) I get an error with the second submission. I don’t know why I have this error as everything seems OK and it works with the "iteration method" or with the "@while method (if all

Re: [Xsltforms-support] Cancelling loop/action

2021-02-04 Thread Josselin Morvan
Hi Steven, Thank you very much for your answer. I don't know why I didn’t think of it before, as I use this method with another form… but not for a loop. It’s simple and efficient! Just for my personal understanding, do you know (or anyone else) how works ev:defaultAction and if it’s fully i

Re: [Xsltforms-support] Cancelling loop/action

2021-02-04 Thread Steven Pemberton
One way would be to submit just one, and let the xforms-submit-done event handler initiate the next. save Steven On Wednesday 03 February 2021 15:33:21 (+01:00), Josselin Morvan wrote: Hi all, With one of my forms I have a « submissio

Re: [Xsltforms-support] Cancelling loop/action

2021-02-04 Thread Steven Pemberton
I was initially too lazy to check if a handler for submit-done was allowed to initiate a submission using the same submission element, but then my shame got the better of me and I looked it up. It is, so this is better (and I also added the necessary if= that I forgot to add):

[Xsltforms-support] Cancelling loop/action

2021-02-03 Thread Josselin Morvan
Hi all, With one of my forms I have a « submission loop » and I try, when I get an « xforms-submit-error », to stop the loop, do you know how we can do that ?. Basically, my form concerns a list of person. I can add informations about the existing ones and, of course, add new persons. Each «