W3C home > Mailing lists > Public > public-xformsusers@w3.org > April 2018

Re: @class on <repeat>

From: Philip Fennell <Philip.Fennell@marklogic.com>
Date: Fri, 6 Apr 2018 15:16:52 +0000
To: Steven Pemberton <steven.pemberton@cwi.nl>, " XForms" <public-xformsusers@w3.org>
Message-ID: <676D2950-2BFE-4696-AB89-1A11196E224E@marklogic.com>
Hello Steven,

My feeling is the former too but I probably wouldn't have used it like that anyway. The repeat would, in all likelihood, be within a container element and I'd have put the class on that container element and not the repeat. Makes me wonder why the class attribute would be specified for the repeat element as it is never 'projected' forward into the resulting document tree.


Regards

Philip


´╗┐On 06/04/2018, 13:31, "Steven Pemberton" <steven.pemberton@cwi.nl> wrote:

    https://www.w3.org/community/xformsusers/wiki/XForms_2.0#The_repeat_Element

    says:
    
    	a repeat like
    	<repeat ref="/products/product">
    	  <output ref="."/><html:br/>
    	</repeat>
    
    	is conceptually similar to
    	<group ref="/products/product[1]"><output ref="."/><html:br/></group>
    	<group ref="/products/product[2]"><output ref="."/><html:br/></group>
    	<group ref="/products/product[3]"><output ref="."/><html:br/></group>
    	<group ref="/products/product[4]"><output ref="."/><html:br/></group>
    
    What I realise is that we need agreement on what @class applies to when  
    used on a repeat.
    
    If I say
    	<repeat class="thing" ref="item">
    	   <output ref="."/>
    	</repeat>
    
    does this mean
    
    	<group class="thing">
    	   <group ref="item[1]"><output ref="."/></group>
    	   <group ref="item[2]"><output ref="."/></group>
    	   <group ref="item[3]"><output ref="."/></group>
    	</group>
    
    or
    
    	<group>
    	   <group class="thing" ref="item[1]"><output ref="."/></group>
    	   <group class="thing" ref="item[2]"><output ref="."/></group>
    	   <group class="thing" ref="item[3]"><output ref="."/></group>
    	</group>
    
    ?
    
    My feeling is for the former, but I'd like to hear your opinion.
    
    Steven
    
    

Received on Friday, 6 April 2018 15:17:23 UTC

This archive was generated by hypermail 2.3.1 : Friday, 6 April 2018 15:17:23 UTC