Re: 12.2.1 References to Elements within a repeat Element

Hi Steven,

It's been a long time, and I wasn't present in the discussion, if there was one, and I might be mis interpreting your text and/or the original text. Enough disclaimer ;)

Isn't there a difference between your text and the original text? In the original text the IDREF is resolved relative to the current 'runtime' iteration of the repeat the element resides in for repeats that are in common AND the current repeat index (for example set with setindex-action. In your text only the current repeat-index is used.

I can only think of one use-case where the current repeat index is different from the current 'runtime' iteration of the repeat, and that is if you have a delay on a dispatch action.

Example:

<xf:repeat ref="entry" id="outer">
    <xf:repeat ref="sub-entry" id="inner">
 <xf:input ref="field1" id="i-1">...</input>
 <xf:setvalue ref="field1" value="'foo'" ev:event="my-custom-event" id="c-1"/>
 <xf:trigger>
                  <xf:dispatch ev:event="DOMActivate" name=" my-custom-event " targetid="c-1" delay="5000"/>
 </xf:trigger>
    </xf:repeat>
</xf:repeat>

When you have multiple entries and or sub-entries AND after you activate the trigger you give focuds to an input field of a different iteration, the value of the incorrect repeat iteration will be set.

I know that it is a contrived example, but I guess you can have this scenario also in real-life use cases. But my XForms knowledge is getting a bit rusty...

Best,

Nick

On 28/06/2018, 14:05, "Steven Pemberton" <steven.pemberton@cwi.nl> wrote:

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

    
    I was trying to simplify the language in this section to try and make it  
    easier to read, and I can't find any case that isn't covered by the text:
    
    "The target object is identified by the current values of the repeat  
    indexes of the enclosing repeats. If any index is zero, no object is  
    identified."
    
    Am I missing anything?
    
    Steven
    
    

Received on Thursday, 28 June 2018 13:33:11 UTC