Hi;
I have a submission of the form: From the view: <xforms:submission id="person-search-submit" ref="instance('search-instance')" instance="results-instance" method="get" replace="instance" resource="/admin/edit-scw-permissions/"> <xforms:message ev:event="xforms-submit-error" level="modal">Error!!</xforms:message> </xforms:submission> The submission is executed in XPL like: <p:processor name="oxf:xforms-submission"> <p:input name="submission"> <xforms:submission method="get" resource="https://localhost/myResource.do" /> </p:input> <p:input name="request" href="#instance" /> <p:output name="response" id="person-search-response" /> </p:processor> The request input for this is formatted by a previous processor and is of the form: <parameters xmlns=""> <param1>1</param1> <param2>2</param2> </parameters> This all works fine and returns me a result of the form <?xml version="1.0" encoding="UTF-8"?> <results> <status>success</status> <result> <persons totalRecords="2" rows="20" start="0"> <person> <pid>pid1</pid> <displayname>Surname, Firstname</displayname> <the_email>oneathome.com</the_email> </person> </persons> </result> </results> Now, immediately after the submission, I'm trying to do an XPL choose dependent upon the results like so: <p:choose href="#person-search-response"> <p:when test="/results"> <p:processor name="oxf:xslt-2.0"> <p:input name="config"> <xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"> <xsl:template match="/"> .....xslt.... </xsl:template> </xsl:transform> </p:input> </p:processor> ..... ..... The problem I'm having is with <p:when test="/results">. For some reason, the XPath does not seem to evaluate at all. It works with root (/), nothing else. Can anybody point out to me where I'm going wrong (please)? |
Administrator
|
What happens if you put:
<p:choose href="#person-search-response" debug="person-search-response"> Do you see a document in the logs which has <results> as a root element? -Erik On Tue, Dec 4, 2012 at 5:26 PM, Berrisford <[hidden email]> wrote: > Hi; > I have a submission of the form: > From the view: > <xforms:submission id="person-search-submit" > ref="instance('search-instance')" instance="results-instance" method="get" > replace="instance" resource="/admin/edit-scw-permissions/"> > <xforms:message ev:event="xforms-submit-error" > level="modal">Error!!</xforms:message> > </xforms:submission> > > The submission is executed in XPL like: > <p:processor name="oxf:xforms-submission"> > <p:input name="submission"> > <xforms:submission method="get" > resource="https://localhost/myResource.do" /> > </p:input> > <p:input name="request" href="#instance" /> > <p:output name="response" id="person-search-response" /> > </p:processor> > > The request input for this is formatted by a previous processor and is of > the form: > <parameters xmlns=""> > <param1>1</param1> > <param2>2</param2> > </parameters> > > This all works fine and returns me a result of the form > <?xml version="1.0" encoding="UTF-8"?> > <results> > <status>success</status> > <result> > <persons totalRecords="2" rows="20" start="0"> > <person> > <pid>pid1</pid> > <displayname>Surname, Firstname</displayname> > <the_email>oneathome.com</the_email> > </person> > </persons> > </result> > </results> > > Now, immediately after the submission, I'm trying to do an XPL choose > dependent upon the results like so: > <p:choose href="#person-search-response"> > <p:when test="/results"> > <p:processor name="oxf:xslt-2.0"> > <p:input name="config"> > <xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > version="2.0"> > <xsl:template match="/"> > .....xslt.... > </xsl:template> > </xsl:transform> > </p:input> > </p:processor> > ..... > ..... > > The problem I'm having is with <p:when test="/results">. For some reason, > the XPath does not seem to evaluate at all. It works with root (/), nothing > else. Can anybody point out to me where I'm going wrong (please)? > > > > -- > View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/XPath-not-working-with-XPL-choose-tp4656069.html > Sent from the Orbeon Forms (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 |
Hi Erik;
Thanks for your response. I’ve managed to come to
the bottom of it. Turns out there was a (server side) problem with the GET
request method and the document actually wasn’t being returned (as you
suspected), as determined by examining the logs. Changing the method to POST
resolved the problem.
Thanks...
************************************************* Berrisford Edwards [hidden email] Ph: +447917464336 From: [hidden email]
Sent: Friday, December 07, 2012 6:26 AM
To: [hidden email]
Subject: Re: XPath not working with XPL choose What
happens if you put: <p:choose href="#person-search-response" debug="person-search-response"> Do you see a document in the logs which has <results> as a root element? -Erik On Tue, Dec 4, 2012 at 5:26 PM, Berrisford <<A href="wlmailhtml:/user/SendEmail.jtp?type=node&node=4656084&i=0" rel=nofollow target=_top link="external">[hidden email]> wrote: > Hi; > I have a submission of the form: > From the view: > <xforms:submission id="person-search-submit" > ref="instance('search-instance')" instance="results-instance" method="get" > replace="instance" resource="/admin/edit-scw-permissions/"> > <xforms:message ev:event="xforms-submit-error" > level="modal">Error!!</xforms:message> > </xforms:submission> > > The submission is executed in XPL like: > <p:processor name="oxf:xforms-submission"> > <p:input name="submission"> > <xforms:submission method="get" > resource="https://localhost/myResource.do" /> > </p:input> > <p:input name="request" href="#instance" /> > <p:output name="response" id="person-search-response" /> > </p:processor> > > The request input for this is formatted by a previous processor and is of > the form: > <parameters xmlns=""> > <param1>1</param1> > <param2>2</param2> > </parameters> > > This all works fine and returns me a result of the form > <?xml version="1.0" encoding="UTF-8"?> > <results> > <status>success</status> > <result> > <persons totalRecords="2" rows="20" start="0"> > <person> > <pid>pid1</pid> > <displayname>Surname, Firstname</displayname> > <the_email>oneathome.com</the_email> > </person> > </persons> > </result> > </results> > > Now, immediately after the submission, I'm trying to do an XPL choose > dependent upon the results like so: > <p:choose href="#person-search-response"> > <p:when test="/results"> > <p:processor name="oxf:xslt-2.0"> > <p:input name="config"> > <xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > version="2.0"> > <xsl:template match="/"> > .....xslt.... > </xsl:template> > </xsl:transform> > </p:input> > </p:processor> > ..... > ..... > > The problem I'm having is with <p:when test="/results">. For some reason, > the XPath does not seem to evaluate at all. It works with root (/), nothing > else. Can anybody point out to me where I'm going wrong (please)? > > > > -- > View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/XPath-not-working-with-XPL-choose-tp4656069.html > Sent from the Orbeon Forms (ops-users) mailing list archive at Nabble.com. > > > -- > You receive this message as a subscriber of the <A href="wlmailhtml:/user/SendEmail.jtp?type=node&node=4656084&i=1" rel=nofollow target=_top link="external">[hidden email] mailing list. > To unsubscribe: mailto:<A href="wlmailhtml:/user/SendEmail.jtp?type=node&node=4656084&i=2" rel=nofollow target=_top link="external">[hidden email] > For general help: mailto:<A href="wlmailhtml:/user/SendEmail.jtp?type=node&node=4656084&i=3" rel=nofollow target=_top link="external">[hidden email]?subject=help > OW2 mailing lists service home page: http://www.ow2.org/wws > -- You receive this message as a subscriber of the <A href="wlmailhtml:/user/SendEmail.jtp?type=node&node=4656084&i=4" rel=nofollow target=_top link="external">[hidden email] mailing list. To unsubscribe: mailto:<A href="wlmailhtml:/user/SendEmail.jtp?type=node&node=4656084&i=5" rel=nofollow target=_top link="external">[hidden email] For general help: mailto:<A href="wlmailhtml:/user/SendEmail.jtp?type=node&node=4656084&i=6" rel=nofollow target=_top link="external">[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws If you reply to this email, your message will be
added to the discussion below: http://orbeon-forms-ops-users.24843.n4.nabble.com/XPath-not-working-with-XPL-choose-tp4656069p4656084.html
|
Free forum by Nabble | Edit this page |