I have an instance that looks like this:
<projects> <project ID="ID_1"> <... project stuff ..> </project> </projects> I want to submit to an XQuery resource and I want to submit the project ID attribute as a parameter. I want to submit something like this: ../get_project_details.xq?ID='ID_1' I was hoping this submit would do the trick, but it doesn't work (errors out saying it needs to be a node): <submission id="..." ref="instance('project_instance')/project/@ID" ...> How can I submit the ID attribute value as a parameter? Thanks |
Would AVTs help you?
http://www.orbeon.com/ops/doc/reference-xforms-2#avts On Jun 25, 2008, at 9:53 PM, Pieter Hartog wrote: > > I have an instance that looks like this: > <projects> > <project ID="ID_1"> > <... project stuff ..> > </project> > </projects> > > I want to submit to an XQuery resource and I want to submit the > project ID > attribute as a parameter. > I want to submit something like this: ../get_project_details.xq? > ID='ID_1' > > I was hoping this submit would do the trick, but it doesn't work > (errors out > saying it needs to be a node): > <submission id="..." ref="instance('project_instance')/project/ > @ID" ...> > > How can I submit the ID attribute value as a parameter? > > Thanks > -- > View this message in context: http://www.nabble.com/how-to-submit-an-attribute-value-as-a-parameter--tp18120467p18120467.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 |
That would work indeed. Thanks.
However, I'm surprised that XForms doesn't have a standard way of doing this. The funny thing is that you CAN submit an element value as a parameter. For example, if my xml structure would look like this (ID is not an attribute, but an element): <project> <ID>ID_1</ID> <description>..</description> < ... more stuff ...> </project> Then I'm able to use this ref attribute in the submission just fine: <submission id=".." ref="instance('project_instance')/project/ID" /> So I'm surprised I could not do this with attribute values. Is this something to suggest to the w3c XForms workgroup, or is this an Orbeon implementation specific behavior? Thanks, Pieter
|
Administrator
|
XForms 1.0 did not have anything to deal with this.
XForms 1.1 adds the <xforms:resource value="..."/> nested element (which we don't implement yet) to allow for this kind of things. However, at Orbeon we don't particularly like this approach. We like AVTs much better as they are lighter in syntax and more generic. -Erik On Jun 26, 2008, at 4:15 AM, Pieter Hartog wrote: > > That would work indeed. Thanks. > > However, I'm surprised that XForms doesn't have a standard way of > doing > this. The funny thing is that you CAN submit an element value as a > parameter. > For example, if my xml structure would look like this (ID is not an > attribute, but an element): > <project> > <ID>ID_1</ID> > <description>..</description> > < ... more stuff ...> > </project> > Then I'm able to use this ref attribute in the submission just fine: > <submission id=".." ref="instance('project_instance')/project/ID" /> > So I'm surprised I could not do this with attribute values. > > Is this something to suggest to the w3c XForms workgroup, or is this > an > Orbeon implementation specific behavior? > > Thanks, > Pieter > > > > Alexander Zatko wrote: >> >> Would AVTs help you? >> >> http://www.orbeon.com/ops/doc/reference-xforms-2#avts >> >> >> On Jun 25, 2008, at 9:53 PM, Pieter Hartog wrote: >> >>> >>> I have an instance that looks like this: >>> <projects> >>> <project ID="ID_1"> >>> <... project stuff ..> >>> </project> >>> </projects> >>> >>> I want to submit to an XQuery resource and I want to submit the >>> project ID >>> attribute as a parameter. >>> I want to submit something like this: ../get_project_details.xq? >>> ID='ID_1' >>> >>> I was hoping this submit would do the trick, but it doesn't work >>> (errors out >>> saying it needs to be a node): >>> <submission id="..." ref="instance('project_instance')/project/ >>> @ID" ...> >>> >>> How can I submit the ID attribute value as a parameter? >>> >>> Thanks >>> -- >>> View this message in context: >>> http://www.nabble.com/how-to-submit-an-attribute-value-as-a-parameter--tp18120467p18120467.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://www.nabble.com/how-to-submit-an-attribute-value-as-a-parameter--tp18120467p18131437.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 Orbeon Forms - Web Forms for the Enterprise Done the Right Way 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 |