Hi,
It seems that the index() function does not work within the xforms:group ref="..." attribute (see testxformsrepeatandindex2.jsp) in the latest nightly builds. As a work around, you can use xxforms:variable (see testxformsrepeatandindex1.jsp). However, when you delete all items in the example and then insert a new item the item will not get selected (index = 0). I ever tried to use xforms:setindex but it didn't work. Erik, see the attached files for reproducing the issues. Kind regards -Markku -- 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 testxformsrepeatandindex1.jsp (3K) Download Attachment testxformsrepeatandindex2.jsp (3K) Download Attachment |
Hi,
> It seems that the index() function does not work within the > xforms:group ref="..." attribute (see testxformsrepeatandindex2.jsp) > in the latest nightly builds. As a work around, you can use > xxforms:variable (see testxformsrepeatandindex1.jsp). However, when > you delete all items in the example and then insert a new item the > item will not get selected (index = 0). I ever tried to use > xforms:setindex but it didn't work. Resurrecting the topic ... just to make sure, is anyone else facing similar problems with the index() function? Erik, were you able to reproduce the issue? Kind regards -Markku -- 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 |
Administrator
|
Markku,
I think that now the two methods (variable / no variable) work the same. We recently changed the way the index is made available during controls construction. But I still reproduced the issue of the first insert after removing all items, and I fixed that: http://github.com/orbeon/orbeon-forms/commit/3c02a42579cfe4ef3317bc863fa2f7de8f05b465 Please let us know if that works for you! -Erik On Mon, Dec 7, 2009 at 2:44 AM, Markku Laine <[hidden email]> wrote: > Hi, > > >> It seems that the index() function does not work within the xforms:group >> ref="..." attribute (see testxformsrepeatandindex2.jsp) in the latest >> nightly builds. As a work around, you can use xxforms:variable (see >> testxformsrepeatandindex1.jsp). However, when you delete all items in the >> example and then insert a new item the item will not get selected (index = >> 0). I ever tried to use xforms:setindex but it didn't work. > > Resurrecting the topic ... just to make sure, is anyone else facing similar > problems with the index() function? Erik, were you able to reproduce the > issue? > > Kind regards > > > -Markku > > > -- > 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 |
Erik,
testxformsrepeatandindex2.jsp (without variable) works perfectly now. Thanks! testxformsrepeatandindex1.jsp (with variable), however, still does not work as it should. If you delete all items and then insert a new item you will see that the newly inserted item is not in the edit mode (as it is, and should be, in the example #2). Regards -Markku On 11.12.2009, at 6.00, Erik Bruchez wrote: > Markku, > > I think that now the two methods (variable / no variable) work the > same. We recently changed the way the index is made available during > controls construction. > > But I still reproduced the issue of the first insert after removing > all items, and I fixed that: > > http://github.com/orbeon/orbeon-forms/commit/3c02a42579cfe4ef3317bc863fa2f7de8f05b465 > > Please let us know if that works for you! > > -Erik > > On Mon, Dec 7, 2009 at 2:44 AM, Markku Laine <[hidden email]> > wrote: >> Hi, >> >> >>> It seems that the index() function does not work within the >>> xforms:group >>> ref="..." attribute (see testxformsrepeatandindex2.jsp) in the >>> latest >>> nightly builds. As a work around, you can use xxforms:variable (see >>> testxformsrepeatandindex1.jsp). However, when you delete all items >>> in the >>> example and then insert a new item the item will not get selected >>> (index = >>> 0). I ever tried to use xforms:setindex but it didn't work. >> >> Resurrecting the topic ... just to make sure, is anyone else facing >> similar >> problems with the index() function? Erik, were you able to >> reproduce the >> issue? >> >> Kind regards >> >> >> -Markku >> >> >> -- >> 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 -- 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 |
People
Note: first time XForms developer. Could someone please suggest a good approach to the following simple problems? I have a nice working Orbeon XForm, complete with XSD. At the moment the XML for a sample form is hard-coded into the form model. What I want to do is load this dynamically from a web service based on the user's input. I have made a basic test web-service and have been able to fetch data from it using a submission. However it comes back in a SOAP envelope. My questions: 1) What is a good way to request the initial information from the user? I.e. should I create a simple menu form, store the user's selection in a session variable, then load the main form? This is how I did it with jsp 2) What is the fastest and easiest way to get my form out of the SOAP envelope and into the form model? I assume a simple pipeline, possibly using STX would be the way to go? Notes: SOAP Response <?xml version="1.0" encoding="UTF-8"?> <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> <S:Body> <ns2:getFormResponse xmlns:ns2="http://lab.soa.packer.com/"> <return>***** Complete XML form tree here ****</return> </ns2:getFormResponse> </S:Body> </S:Envelope> Cheers Steve -- 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 |
Administrator
|
Steve,
You're saying that you have a SOAP service that returns the complete form (including the XHTML around it, and everything). Instead of having this same data on disk in a file somewhere under the resources, you want to call the web service, and use what it returns as the form. Is that right? If it is, what is the information you need to pass to the web service in the SOAP request? Alex On Mon, Mar 1, 2010 at 4:33 PM, Steven Kerr <[hidden email]> wrote: > People > > Note: first time XForms developer. > > Could someone please suggest a good approach to the following simple > problems? I have a nice working Orbeon XForm, complete with XSD. At > the moment the XML for a sample form is hard-coded into the form model. > What I want to do is load this dynamically from a web service based on > the user's input. I have made a basic test web-service and have been > able to fetch data from it using a submission. However it comes back in > a SOAP envelope. > > My questions: > 1) What is a good way to request the initial information from the user? > I.e. should I create a simple menu form, store the user's selection in a > session variable, then load the main form? This is how I did it with > jsp > > 2) What is the fastest and easiest way to get my form out of the SOAP > envelope and into the form model? I assume a simple pipeline, possibly > using STX would be the way to go? > > Notes: > > SOAP Response > > <?xml version="1.0" encoding="UTF-8"?> > <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> > <S:Body> > <ns2:getFormResponse xmlns:ns2="http://lab.soa.packer.com/"> > <return>***** Complete XML form tree here ****</return> > </ns2:getFormResponse> > </S:Body> > </S:Envelope> > > Cheers > > Steve > > > > > -- > 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 > > -- Orbeon Forms - Web forms, open-source, for the Enterprise - http://www.orbeon.com/ My Twitter: http://twitter.com/avernet -- 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
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Alex
I guess my main question is how best to get my XML data out of the SOAP envelope and into my form model, replacing the place-holder XML. The form itself is for recording test results will be different based on the product, customer, etc. There seems to be a lot of different ways to achieve the same thing so I wanted an experts opinion on which is best. As my project is running a few months behind schedule I would like to get it right the first time ;) Cheers Steve -----Original Message----- From: Alessandro Vernet [mailto:[hidden email]] Sent: Wednesday, 3 March 2010 04:41 To: [hidden email] Subject: [ops-users] Re: XML Transformations - using STX? Steve, You're saying that you have a SOAP service that returns the complete form (including the XHTML around it, and everything). Instead of having this same data on disk in a file somewhere under the resources, you want to call the web service, and use what it returns as the form. Is that right? If it is, what is the information you need to pass to the web service in the SOAP request? Alex On Mon, Mar 1, 2010 at 4:33 PM, Steven Kerr <[hidden email]> wrote: > People > > Note: first time XForms developer. > > Could someone please suggest a good approach to the following simple > problems? I have a nice working Orbeon XForm, complete with XSD. At > the moment the XML for a sample form is hard-coded into the form model. > What I want to do is load this dynamically from a web service based on > the user's input. I have made a basic test web-service and have been > able to fetch data from it using a submission. However it comes back > in a SOAP envelope. > > My questions: > 1) What is a good way to request the initial information from the user? > I.e. should I create a simple menu form, store the user's selection in > a session variable, then load the main form? This is how I did it > with jsp > > 2) What is the fastest and easiest way to get my form out of the SOAP > envelope and into the form model? I assume a simple pipeline, > possibly using STX would be the way to go? > > Notes: > > SOAP Response > > <?xml version="1.0" encoding="UTF-8"?> > <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> > <S:Body> > <ns2:getFormResponse > xmlns:ns2="http://lab.soa.packer.com/"> > <return>***** Complete XML form tree here ****</return> > </ns2:getFormResponse> > </S:Body> > </S:Envelope> > > Cheers > > Steve > > > > > -- > 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 > > -- Orbeon Forms - Web forms, open-source, for the Enterprise - http://www.orbeon.com/ My Twitter: http://twitter.com/avernet -- 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 |
In reply to this post by Alessandro Vernet
Alex
To clarify my question. Below is a simple example of what I am trying to do. I have used in-line documents to make it clear. The below seems to be a waste of processing as it is copying almost all of the base documents as is. Does Orbeon currently support using streaming transformations and if so how can that be applied to the below? Cheers Steve ************************************************** <p:config xmlns:p="http://www.orbeon.com/oxf/pipeline" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns2="http://lab.soa.packer.com/" xmlns:oxf="http://www.orbeon.com/oxf/processors"> <p:param name="data" type="output"/> <p:processor name="oxf:xslt"> <p:input name="data"> <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> <S:Body> <ns2:getFormResponse xmlns:ns2="http://lab.soa.packer.com/"> <return> <resultsForms> <resultsForm/> </resultsForms> </return> </ns2:getFormResponse> </S:Body> </S:Envelope> </p:input> <p:input name="config"> <xsl:stylesheet version="1.0"> <xsl:template match="/S:Envelope/S:Body/ns2:getFormResponse/return/resultsForms" > <xsl:copy-of select="."/> </xsl:template> </xsl:stylesheet> </p:input> <p:output name="data" ref="data"/> </p:processor> </p:config> ************************************************** Output: <resultsForms> <resultsForm/> </resultsForms> ************************************************** -----Original Message----- From: Alessandro Vernet [mailto:[hidden email]] Sent: Wednesday, 3 March 2010 04:41 To: [hidden email] Subject: [ops-users] Re: XML Transformations - using STX? Steve, You're saying that you have a SOAP service that returns the complete form (including the XHTML around it, and everything). Instead of having this same data on disk in a file somewhere under the resources, you want to call the web service, and use what it returns as the form. Is that right? If it is, what is the information you need to pass to the web service in the SOAP request? Alex On Mon, Mar 1, 2010 at 4:33 PM, Steven Kerr <[hidden email]> wrote: > People > > Note: first time XForms developer. > > Could someone please suggest a good approach to the following simple > problems? I have a nice working Orbeon XForm, complete with XSD. At > the moment the XML for a sample form is hard-coded into the form model. > What I want to do is load this dynamically from a web service based on > the user's input. I have made a basic test web-service and have been > able to fetch data from it using a submission. However it comes back > in a SOAP envelope. > > My questions: > 1) What is a good way to request the initial information from the user? > I.e. should I create a simple menu form, store the user's selection in > a session variable, then load the main form? This is how I did it > with jsp > > 2) What is the fastest and easiest way to get my form out of the SOAP > envelope and into the form model? I assume a simple pipeline, > possibly using STX would be the way to go? > > Notes: > > SOAP Response > > <?xml version="1.0" encoding="UTF-8"?> > <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> > <S:Body> > <ns2:getFormResponse > xmlns:ns2="http://lab.soa.packer.com/"> > <return>***** Complete XML form tree here ****</return> > </ns2:getFormResponse> > </S:Body> > </S:Envelope> > > Cheers > > Steve > > > > > -- > 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 > > -- Orbeon Forms - Web forms, open-source, for the Enterprise - http://www.orbeon.com/ My Twitter: http://twitter.com/avernet -- 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 |
Administrator
|
Steve,
So you have this working right? You have an XPL using the submission processor to call your SOAP service, and then you use XSLT to extract what is under <resultsForms> in the response. You can do this last step in XSLT, like you did, or simply with XPointer. I.e. if the output from your submission processor has the id "soap", you can write on the input of another processor: <p:input name="..." href="#soap#xpointer(/S:Envelope/S:Body/ns2:getFormResponse/return/resultsForms)"/> Alex On Tue, Mar 2, 2010 at 9:17 PM, Steven Kerr <[hidden email]> wrote: > Alex > > To clarify my question. Below is a simple example of what I am trying to do. I have used in-line documents to make it clear. The below seems to be a waste of processing as it is copying almost all of the base documents as is. Does Orbeon currently support using streaming transformations and if so how can that be applied to the below? > > Cheers > > Steve > > ************************************************** > > <p:config xmlns:p="http://www.orbeon.com/oxf/pipeline" > xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" > xmlns:ns2="http://lab.soa.packer.com/" > xmlns:oxf="http://www.orbeon.com/oxf/processors"> > > <p:param name="data" type="output"/> > <p:processor name="oxf:xslt"> > <p:input name="data"> > <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> > <S:Body> > <ns2:getFormResponse xmlns:ns2="http://lab.soa.packer.com/"> > <return> > <resultsForms> > <resultsForm/> > </resultsForms> > </return> > </ns2:getFormResponse> > </S:Body> > </S:Envelope> > </p:input> > <p:input name="config"> > <xsl:stylesheet version="1.0"> > <xsl:template match="/S:Envelope/S:Body/ns2:getFormResponse/return/resultsForms" > > <xsl:copy-of select="."/> > </xsl:template> > </xsl:stylesheet> > </p:input> > <p:output name="data" ref="data"/> > </p:processor> > </p:config> > > ************************************************** > > Output: > <resultsForms> > <resultsForm/> > </resultsForms> > > ************************************************** > > > > > > > -----Original Message----- > From: Alessandro Vernet [mailto:[hidden email]] > Sent: Wednesday, 3 March 2010 04:41 > To: [hidden email] > Subject: [ops-users] Re: XML Transformations - using STX? > > Steve, > > You're saying that you have a SOAP service that returns the complete form (including the XHTML around it, and everything). Instead of having this same data on disk in a file somewhere under the resources, you want to call the web service, and use what it returns as the form. > Is that right? > > If it is, what is the information you need to pass to the web service in the SOAP request? > > Alex > > On Mon, Mar 1, 2010 at 4:33 PM, Steven Kerr <[hidden email]> wrote: >> People >> >> Note: first time XForms developer. >> >> Could someone please suggest a good approach to the following simple >> problems? I have a nice working Orbeon XForm, complete with XSD. At >> the moment the XML for a sample form is hard-coded into the form model. >> What I want to do is load this dynamically from a web service based on >> the user's input. I have made a basic test web-service and have been >> able to fetch data from it using a submission. However it comes back >> in a SOAP envelope. >> >> My questions: >> 1) What is a good way to request the initial information from the user? >> I.e. should I create a simple menu form, store the user's selection in >> a session variable, then load the main form? This is how I did it >> with jsp >> >> 2) What is the fastest and easiest way to get my form out of the SOAP >> envelope and into the form model? I assume a simple pipeline, >> possibly using STX would be the way to go? >> >> Notes: >> >> SOAP Response >> >> <?xml version="1.0" encoding="UTF-8"?> >> <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> >> <S:Body> >> <ns2:getFormResponse >> xmlns:ns2="http://lab.soa.packer.com/"> >> <return>***** Complete XML form tree here ****</return> >> </ns2:getFormResponse> >> </S:Body> >> </S:Envelope> >> >> Cheers >> >> Steve >> >> >> >> >> -- >> 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 >> >> > > > > -- > Orbeon Forms - Web forms, open-source, for the Enterprise - http://www.orbeon.com/ My Twitter: http://twitter.com/avernet > > > > -- > 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 > > -- Orbeon Forms - Web forms, open-source, for the Enterprise - http://www.orbeon.com/ My Twitter: http://twitter.com/avernet -- 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
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Free forum by Nabble | Edit this page |