I am running the Orbeon XForms engine with a Java application.
Since I am not using the Page Flow Control with pipelines, etc what is the best
way to strip blank attributes/elements before posting to eXist? Thanks, Mike -- 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
|
Michael,
On Jan 16, 2008 12:50 PM, Park, Michael <[hidden email]> wrote: > I am running the Orbeon XForms engine with a Java application. Since I am > not using the Page Flow Control with pipelines, etc what is the best way to > strip blank attributes/elements before posting to eXist? You are using Orbeon in separate deployment; is that what you are saying? If this is the case, I see 2 ways to do this: 1. In XForms: copy the XML to another temporary instance (xforms:insert), remove the blank attributes/elements there (xforms:delete with "while" attribute), and submit that instance. 2. In XPL: using the xxform:call-xpl() function, which lets you call XPL directly without going through and HTTP request and the page flow. See http://www.orbeon.com/ops/doc/reference-xforms-2#ops-extensions. Then do the transfomartion in XPL, return the updated document, and do the submission from XForms. Alex -- Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise http://www.orbeon.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 |
Alex,
Thank you. I had asked this question differently before. Eric mentioned that I could accomplish it with relevance: <xforms:bind nodeset="//*[not(*) and . = '']" relevant="false()"/> The problem is that when you do this it immediately applies the XPath and everything is stripped before the form is filled out. Is there a piece of this I'm missing? Thanks, Mike -----Original Message----- From: [hidden email] [mailto:[hidden email]] On Behalf Of Alessandro Vernet Sent: Wednesday, January 16, 2008 9:11 PM To: [hidden email] Subject: Re: [ops-users] how to apply XSLT before POSTing to eXist Michael, On Jan 16, 2008 12:50 PM, Park, Michael <[hidden email]> wrote: > I am running the Orbeon XForms engine with a Java application. Since I am > not using the Page Flow Control with pipelines, etc what is the best way to > strip blank attributes/elements before posting to eXist? You are using Orbeon in separate deployment; is that what you are saying? If this is the case, I see 2 ways to do this: 1. In XForms: copy the XML to another temporary instance (xforms:insert), remove the blank attributes/elements there (xforms:delete with "while" attribute), and submit that instance. 2. In XPL: using the xxform:call-xpl() function, which lets you call XPL directly without going through and HTTP request and the page flow. See http://www.orbeon.com/ops/doc/reference-xforms-2#ops-extensions. Then do the transfomartion in XPL, return the updated document, and do the submission from XForms. Alex -- Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise http://www.orbeon.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 |
Administrator
|
Mike,
On Jan 17, 2008 5:45 AM, Park, Michael <[hidden email]> wrote: > Thank you. I had asked this question differently before. Eric > mentioned that I could accomplish it with relevance: > > <xforms:bind nodeset="//*[not(*) and . = '']" > relevant="false()"/> > > The problem is that when you do this it immediately applies the XPath > and everything is stripped before the form is filled out. Is there a > piece of this I'm missing? Good point. That's also a good way to do it. If you don't want those fields bound to empty node to just not show up in the UI, you will need to write the relevant expression in such a way that it returns false() only just before doing the submission. One way to do that is to have a "flag" in another instance that you set to "true" before the submission. The bind has relevant="instance('v')/submitting != 'true'". Then when the submission ends (events xforms-submit-done and xforms-submit-error) you set back the flag to 'false'. Alex -- Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise http://www.orbeon.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 |
Free forum by Nabble | Edit this page |