RE: how to get xforms:output into an attribute?

As David points out, trigger with appearance="minimal" is so useful that most XForms processors now implement it. 
You may need to add some CSS, such as
  xf|trigger[appearance='minimal'] > xf|label { color: blue; text-decoration: underline; }

Although it wasn't my idea, I'd like to mention another possible approach on this use case:
 <xf:bind nodeset="/list/item/@link" type="xsd:anyURI" />
...
<xf:repeat nodeset="/list/item">
 <xf:output xlink:type="simple" ref="@link"><xf:label ref ="../@linktext"/></xf:output>
</xf:repeat>

You might check to see if your processor implements this.  If you squint at the Xlink Rec in just the right way, you can read this as conformant  ;-)

If you're going to use XBL to teach your processor about the custom rendering as David and Mark mention, I personally prefer the idea of using xlink:type="simple" over the idea of using a custom appearance attribute.

Leigh.


-----Original Message-----
From: www-forms-request@w3.org [mailto:www-forms-request@w3.org] On Behalf Of David Landwehr
Sent: Tuesday, March 20, 2007 5:01 AM
To: Erik Sjölund
Cc: www-forms@w3.org
Subject: Re: how to get xforms:output into an attribute?


Hi Erik,

This use case are commonly solved by using XForms actions and UI 
elements. Most implementations support an appearance on trigger of 
minimal and then shows the trigger as an anchor. So your use case could 
be solved with the following markup:
<xf:repeat nodeset="/list/item">
  <xf:trigger appearance="minimal">
    <xf:label ref="@linktext"/>
    <xf:load ref="@link"/>
  </xf:trigger>
</xf:repeat>

I have no idea if FormFaces implemented something like that, so I'm not 
sure if it helps you in your application development. Maybe FormFaces 
has some way to let you chose which rendering you would like for the 
trigger in another way (this is also what I believe  Mark Birbeck 
describes in his answer to the other mail, e.g. using XBL to attach 
custom renderings into the host language).

Best regards,
David

Received on Tuesday, 20 March 2007 16:56:16 UTC