Hey all;
Is there any good documentation, or examples of simple xbl components that do nodeset binding (I think I have the term right) as opposed to single-node binding? Does Orbeon support this? I'm trying to write an xbl component that exports data in a form something like: <image> <title /> <caption /> <url /> </image> But I can not seem to find any sample xbl components that do this, nor any instruction on doing this. I've seen a few components that have a fairly complex local instance used for storing local state. But I have not found any examples that export a more complex nodeset. P.S. Oops. I forgot a key part. I'm trying to create an XBL component that is usable in Form Builder. Some of my confusion is about the content within the form builder "metadata" section. Thanks, Andy G Harding Marketing Inc |
Administrator
|
Andy,
I would still use an ref="..." instead of a nodeset="...", as the XBL control is pointing to a single node. We don't have an example that does this, but it is perfectly doable. The ref would be pointing to the <image> element, and if there is a chance that the instance provided by the user doesn't contain the sub-elements, you might want to check if they exist, and create them if they don't on xforms-enabled. Give it a shot, and let us know if you're having any difficulties with this. Alex On Mon, Aug 9, 2010 at 12:15 PM, apgoar <[hidden email]> wrote: > > Hey all; > > Is there any good documentation, or examples of simple xbl components that > do nodeset binding (I think I have the term right) as opposed to single-node > binding? Does Orbeon support this? > > I'm trying to write an xbl component that exports data in a form something > like: > > <image> > <title /> > <caption /> > <url /> > </image> > > > But I can not seem to find any sample xbl components that do this, nor any > instruction on doing this. > > I've seen a few components that have a fairly complex local instance used > for storing local state. But I have not found any examples that export a > more complex nodeset. > > > Thanks, > > Andy G > Harding Marketing Inc > -- > View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/Nodeset-binding-tp2318939p2318939.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 > > -- 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 |
This post was updated on .
Many thanks Alex. That got me started.
On your last point, I am running into issues trying to create the sub elements if they exist. I am able to use <xforms:insert> easy enough to insert the sub elements, but I'm struggling a bit on the syntax of the test for existence that executes on xforms-enabled. So If I want to add a subelement 'foo" to the root element, I can do: <xforms:insert ev:event="xforms-enabled" context="." origin="xxforms:element('foo')"/> But everything I have tried in order to only do this if 'foo' does not already exist has failed in by XBL. Any quick tip on the syntax for a 'does this node exist' test? Andy Note added: Nevermind. I think I figurd it out (see reply below). Thanks so much for your help Alex. Harding Marketing |
Nevermind. I figured it out. Something like
<xforms:action ev:event="xforms-enabled" if="not(./imageUrl)"> <xforms:insert origin="xxforms:element('imageUrl')" context="."/> </xforms:action> is appropreate, right? |
Administrator
|
Looks ok to me.
Sometimes, we prefer a more explicit XPath existence test, e.g.: not(exists(imageUrl)) More verbose but clearer. -Erik On Mon, Aug 16, 2010 at 7:43 AM, apgoar <[hidden email]> wrote: > > Nevermind. I figured it out. Something like > > <xforms:action > ev:event="xforms-enabled" > if="not(./imageUrl)"> > <xforms:insert origin="xxforms:element('imageUrl')" > context="."/> > </xforms:action> > > is appropreate, right? > -- > View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/Nodeset-binding-tp2318939p2326978.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 |
Free forum by Nabble | Edit this page |