RE: XForms: Bind value of attribute?

Having CSS selectors be able to apply to bound datatypes + appearance
attributes would be a good future solution; I believe Mark Birbeck has
proposed this.
Leigh.

________________________________

From: www-forms-request@w3.org [mailto:www-forms-request@w3.org] On
Behalf Of John Boyer
Sent: Tuesday, October 03, 2006 5:42 PM
To: Abishek Bellamkonda
Cc: www-forms@w3.org; www-forms-request@w3.org
Subject: RE: XForms: Bind value of attribute?



Ah, not currently in the recommendation. 
In future requirements after XForms 1.1, the working group wants to look
at adding attribute value templates to solve this problem. 

Some implementations have already started to offer AVTs so we can get
some implementation experience.  There's a fair bit of design and spec
work to do regarding edge cases that arise from adding ATVs into
attributes throughout the language, and the working group has already
had some discussions about this (because it seems easier than it is). 

I'm sure that consideration of AVTs for the appearance attribute on
select/select1 will make for some interesting discussions because an
action handler within an item of the select/select1 may instigate an
appearance attribute change that fundamentally changes the nature of the
select/select1, so some implementations of select/select1 will have a
very difficult time dealing with this dynamism. 

In any case, if you're OK with using some features that are not broadly
implemented, then you might be able to find an implementation that
allows an AVT on the appearance attribute.  Of course, it will mean that
some types of CSS styling aren't going to work for you, but not having
it work on a number of implementations (for the short term) will
seemingly be the larger concern anyway. 

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> 

10/03/2006 04:04 PM 

To
John Boyer/CanWest/IBM@IBMCA 
cc
<www-forms@w3.org>, <www-forms-request@w3.org> 
Subject
RE: XForms: Bind value of attribute?

	




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 20:41:34 UTC