- From: Abishek Bellamkonda <abi.bellamkonda@roadhouse.com.au>
- Date: Wed, 4 Oct 2006 09:04:11 +1000
- To: "John Boyer" <boyerj@ca.ibm.com>
- Cc: <www-forms@w3.org>, <www-forms-request@w3.org>
- Message-ID: <235B5412B02A384F884284379E2B84F22D7FA8@rh-hq.hq.roadhouseinteractive.com.au>
I am not sure if you understood what I mean. I want something like this: <select1 appreance="ref(Cat/appreance)"> </select1> Is there something like this? With Regards, Abi (Abishek Bellamkonda) Senior Architect / Technology Specialist / Tech Lead Roadhouse Technologies PTY. LTD. 9/663 Victoria Street Abbotsford 3067 Australia T+ 61 3 9427 7522 F+ 61 3 9427 7533 E abi@roadhouse.com.au <mailto:abi@roadhouse.com.au> W www.roadhouse.com.au <http://www.roadhouse.com.au> _____ From: John Boyer [mailto:boyerj@ca.ibm.com] Sent: Wednesday, 4 October 2006 02:50 AM To: Abishek Bellamkonda Cc: www-forms@w3.org; www-forms-request@w3.org Subject: Re: XForms: Bind value of attribute? Yes, you can use ref to bind a UI control to an attribute. So instead of using a value element in your data, you could use a value attribute. Then, the refs on your select1 would say ref="@value" instead of ref="value". Best regards, John M. Boyer, Ph.D. STSM: Workplace Forms Architect and Researcher Co-Chair, W3C XForms Working Group Workplace, Portal and Collaboration Software IBM Victoria Software Lab E-Mail: boyerj@ca.ibm.com http://www.ibm.com/software/ Blog: http://www.ibm.com/developerworks/blogs/page/JohnBoyer "Abishek Bellamkonda" <abi.bellamkonda@roadhouse.com.au> Sent by: www-forms-request@w3.org 10/02/2006 10:25 PM To <www-forms@w3.org> cc Subject XForms: Bind value of attribute? My scenario is like this, I have a model: <data> <Animals> <Cat appearance="full" name="Cat 1" ><value>Red</value></Cat> <Cat appearance="compact" name="Cat 2"><value>Green</value></Cat> <Cat appearance="minimal" name="Cat 3"><value>Brown</value></Cat> </Animals> </data> Now I want to display the cat colors like this: I want full select1 for Cat1 (appearance = full), compact select1 for Cat 2, and minimal select1 for Cat 3. Does xForms support like xsl:attribute element or something? We can ref any element, but can we do the same for attribute? I am currently doing like this, which works, but I was wondering if there was a better way. <xf:repeat nodeset="Animals/Cat"> <!-Show full --> <xf:group nodeset="current()[@apprearance='full']"> <xf:select1 ref="value" appearance="full"> <xf:label ref="../@name"/> <xf:itemset nodeset="/data/Colors/data"> <xf:label ref="."/> <xf:value ref="."/> </xf:itemset> </xf:select1> </xf:group> <!-Show Minimal --> <xf:group nodeset="current()[@apprearance='compact']"> <xf:select1 ref="value" appearance="compact"> <xf:label ref="../@name"/> <xf:itemset nodeset="/data/Colors/data"> <xf:label ref="."/> <xf:value ref="."/> </xf:itemset> </xf:select1> </xf:group> <!-Show Compact --> <xf:group nodeset="current()[@apprearance='compact']"> <xf:select1 ref="value" appearance="compact"> <xf:label ref="../@name"/> <xf:itemset nodeset="/data/Colors/data"> <xf:label ref="."/> <xf:value ref="."/> </xf:itemset> </xf:select1> </xf:group> </xf:repeat> With Regards, Abi (Abishek Bellamkonda) Senior Architect / Technology Specialist / Tech Lead Roadhouse Technologies PTY. LTD. 9/663 Victoria Street Abbotsford 3067 Australia T+ 61 3 9427 7522 F+ 61 3 9427 7533 E abi@roadhouse.com.au W www.roadhouse.com.au
Received on Wednesday, 4 October 2006 00:27:20 UTC